T - The type of elements in the set.@Experimental(value=STATE) public interface SetState<T> extends GroupingState<T,java.lang.Iterable<T>>
ReadableState cell containing a set of elements.
Implementations of this form of state are expected to implement set operations such as contains(Object) efficiently, reading as little of the overall set as possible.
| Modifier and Type | Method and Description |
|---|---|
ReadableState<java.lang.Boolean> |
addIfAbsent(T t)
Ensures a value is a member of the set, returning
true if it was added and false otherwise. |
ReadableState<java.lang.Boolean> |
contains(T t)
Returns true if this set contains the specified element.
|
SetState<T> |
readLater()
Indicate that the value will be read later.
|
void |
remove(T t)
Removes the specified element from this set if it is present.
|
add, isEmptyreadReadableState<java.lang.Boolean> contains(T t)
ReadableState<java.lang.Boolean> addIfAbsent(T t)
true if it was added and false otherwise.
Elements added will not be reflected in OutputT objects returned by previous calls
to ReadableState.read().
void remove(T t)
Changes will not be reflected in OutputT objects returned by previous calls to
ReadableState.read().
SetState<T> readLater()
ReadableStateThis allows an implementation to start an asynchronous prefetch or to include this state in the next batch of reads.
readLater in interface GroupingState<T,java.lang.Iterable<T>>readLater in interface ReadableState<java.lang.Iterable<T>>