Record Class Streamer.HiddenStreamer<T>

java.lang.Object
java.lang.Record
io.reactivex.rxjava4.core.Streamer.HiddenStreamer<T>
Type Parameters:
T - the element type of the streamer
All Implemented Interfaces:
Streamer<T>, AutoCloseable
Enclosing interface:
Streamer<T>

public static record Streamer.HiddenStreamer<T>(@NonNull Streamer<T> streamer) extends Record implements Streamer<T>
Hides the identity of the Streamer for debug or deoptimization purposes.
Since:
4.0.0
  • Constructor Details

    • HiddenStreamer

      public HiddenStreamer(@NonNull @NonNull Streamer<T> streamer)
      Creates an instance of a HiddenStreamer record class.
      Parameters:
      streamer - the value for the streamer record component
  • Method Details

    • next

      Description copied from interface: Streamer
      Determine if there are more elements available from the source.
      Specified by:
      next in interface Streamer<T>
      Parameters:
      cancellation - ability to perform cancellation on a per-virtual-pull request.
      Returns:
      eventually true or false, indicating availability or termination
    • current

      @NonNull public T current()
      Description copied from interface: Streamer
      Returns the current element if Streamer.next() yielded true. Can be called multiple times between Streamer.next() calls.
      Specified by:
      current in interface Streamer<T>
      Returns:
      the current element
    • finish

      Description copied from interface: Streamer
      Called when the stream ends or gets cancelled. Should be always invoked. TODO, this is inherited from IAsyncDisposable in C#...
      Specified by:
      finish in interface Streamer<T>
      Parameters:
      cancellation - to cancel a stuck finish operation, just in case.
      Returns:
      the stage you can await to cleanups to happen
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • streamer

      @NonNull public @NonNull Streamer<T> streamer()
      Returns the value of the streamer record component.
      Returns:
      the value of the streamer record component