Interface StateSet<SI extends StateIndex<? super S>,S>
- All Superinterfaces:
Collection<S>,Iterable<S>,JsonConvertible,Set<S>
public interface StateSet<SI extends StateIndex<? super S>,S>
extends Set<S>, Iterable<S>, JsonConvertible
A specialized set for sequentially indexed objects. Uses an
index for mapping
indices to actual objects.-
Method Summary
Modifier and TypeMethodDescriptioncopy()static <SI extends StateIndex<? super S>,S>
StateSet<SI, S> create(SI stateIndex) static <SI extends StateIndex<? super S>,S>
StateSet<SI, S> create(SI stateIndex, Collection<S> initial) static <SI extends StateIndex<? super S>,S>
StateSet<SI, S> create(SI stateIndex, S initial) default StringinthashCode()Returns the hash code value for this set.booleanisDisjoint(StateSet<SI, ? extends S> other) stream()default Object[]toArray()default <T> T[]toArray(T[] a) default int[]default JsonValuetoJson()Methods inherited from interface java.util.Collection
parallelStream, removeIf, toArray
-
Method Details
-
create
-
create
-
create
static <SI extends StateIndex<? super S>,S> StateSet<SI,S> create(SI stateIndex, Collection<S> initial) -
copy
-
getStateIndex
SI getStateIndex() -
isDisjoint
-
hashCode
int hashCode()Returns the hash code value for this set. Note that unlike otherSets, the hash code value returned by this implementation is not the sum of the hash codes of its elements.- Specified by:
hashCodein interfaceCollection<SI extends StateIndex<? super S>>- Specified by:
hashCodein interfaceSet<SI extends StateIndex<? super S>>- Overrides:
hashCodein classObject- See Also:
-
toArrayOfIndices
default int[] toArrayOfIndices() -
toArray
- Specified by:
toArrayin interfaceCollection<SI extends StateIndex<? super S>>- Specified by:
toArrayin interfaceSet<SI extends StateIndex<? super S>>
-
toArray
default <T> T[] toArray(T[] a) - Specified by:
toArrayin interfaceCollection<SI extends StateIndex<? super S>>- Specified by:
toArrayin interfaceSet<SI extends StateIndex<? super S>>
-
stream
- Specified by:
streamin interfaceCollection<SI extends StateIndex<? super S>>
-
defaultToString
-
toJson
- Specified by:
toJsonin interfaceJsonConvertible
-