Package com.simsilica.lemur.core
Class VersionedSet<T>
java.lang.Object
java.util.AbstractCollection<T>
java.util.AbstractSet<T>
com.simsilica.lemur.core.VersionedSet<T>
- All Implemented Interfaces:
VersionedObject<Set<T>>
,Iterable<T>
,Collection<T>
,Set<T>
- Direct Known Subclasses:
SelectionModel
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.util.AbstractSet
equals, hashCode, removeAll
Methods inherited from class java.util.AbstractCollection
addAll, clear, contains, containsAll, isEmpty, remove, retainAll, toArray, toArray, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
Constructor Details
-
VersionedSet
public VersionedSet() -
VersionedSet
-
-
Method Details
-
incrementVersion
protected void incrementVersion() -
getVersion
public long getVersion()Description copied from interface:VersionedObject
Returns the current version of the versioned object.- Specified by:
getVersion
in interfaceVersionedObject<T>
-
getObject
Description copied from interface:VersionedObject
Returns the object that is being versioned.- Specified by:
getObject
in interfaceVersionedObject<T>
-
createReference
Description copied from interface:VersionedObject
Creates a new VersionedReference that can be used to monitor when this object changes.- Specified by:
createReference
in interfaceVersionedObject<T>
-
add
- Specified by:
add
in interfaceCollection<T>
- Specified by:
add
in interfaceSet<T>
- Overrides:
add
in classAbstractCollection<T>
-
iterator
-
size
public int size()- Specified by:
size
in interfaceCollection<T>
- Specified by:
size
in interfaceSet<T>
- Specified by:
size
in classAbstractCollection<T>
-