Record Class SampleConfig<T>
java.lang.Object
java.lang.Record
io.reactivex.rxjava4.core.config.SampleConfig<T>
- Type Parameters:
T- the element type of the sequence being sampled- Record Components:
emitLast- iftrueand the upstream completes while there is still an unsampled item available, that item is emitted to downstream before completion iffalse, an unsampled last item is ignored.onDropped- called with the current entry when it has been replaced by a new one
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final SampleConfig<Object> Default configuration with no emit last and an empty onDropped consumer.static final SampleConfig<Object> Default configuration with emit last setting and an empty onDropped consumer. -
Constructor Summary
ConstructorsConstructorDescriptionSampleConfig(boolean emitLast) Creates a config with the given emit last option ad an empty onDropped callback.SampleConfig(boolean emitLast, @NonNull Consumer<? super T> onDropped) Creates a config with the given parameters.SampleConfig(@NonNull Consumer<? super T> onDropped) Creates a config with the given onDropped callback and an no-emit last. -
Method Summary
Modifier and TypeMethodDescriptionbooleanemitLast()Returns the value of theemitLastrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theonDroppedrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
DEFAULT
Default configuration with no emit last and an empty onDropped consumer. -
EMIT_LAST
Default configuration with emit last setting and an empty onDropped consumer.
-
-
Constructor Details
-
SampleConfig
public SampleConfig(boolean emitLast) Creates a config with the given emit last option ad an empty onDropped callback.- Parameters:
emitLast- iftrueand the upstream completes while there is still an unsampled item available, that item is emitted to downstream before completion iffalse, an unsampled last item is ignored.
-
SampleConfig
-
SampleConfig
Creates a config with the given parameters.- Parameters:
emitLast- iftrueand the upstream completes while there is still an unsampled item available, that item is emitted to downstream before completion iffalse, an unsampled last item is ignored.onDropped- called with the current entry when it has been replaced by a new one
-
-
Method Details
-
toString
-
hashCode
-
equals
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
emitLast
-
onDropped
-