Package com.simsilica.lemur.core
Class VersionedReferenceList
- All Implemented Interfaces:
Iterable<VersionedReference>,Collection<VersionedReference>,List<VersionedReference>,SequencedCollection<VersionedReference>
Watches a composite set of VersionedReferences and presents
a combined version. The versioned references watched need
not be of the same type. This is useful for watching for changes
in a whole form of fields, for example.
-
Field Summary
Fields inherited from class java.util.AbstractList
modCount -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(int index, VersionedReference element) voidvoidaddReferences(VersionedObject... objects) static VersionedReferenceListcreate(VersionedObject... objects) get(int index) longlongbooleanremove(int index) booleanset(int index, VersionedReference element) intsize()booleanupdate()Methods inherited from class java.util.AbstractList
add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, removeRange, subListMethods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface java.util.List
addAll, addFirst, addLast, contains, containsAll, getFirst, getLast, isEmpty, remove, removeAll, removeFirst, removeLast, replaceAll, retainAll, reversed, sort, spliterator, toArray, toArray
-
Constructor Details
-
VersionedReferenceList
public VersionedReferenceList()
-
-
Method Details
-
create
-
addReferences
-
addReference
-
removeReference
-
get
- Specified by:
getin interfaceList<VersionedReference>- Specified by:
getin classAbstractList<VersionedReference>
-
size
public int size()- Specified by:
sizein interfaceCollection<VersionedReference>- Specified by:
sizein interfaceList<VersionedReference>- Specified by:
sizein classAbstractCollection<VersionedReference>
-
set
- Specified by:
setin interfaceList<VersionedReference>- Overrides:
setin classAbstractList<VersionedReference>
-
add
- Specified by:
addin interfaceList<VersionedReference>- Overrides:
addin classAbstractList<VersionedReference>
-
remove
- Specified by:
removein interfaceList<VersionedReference>- Overrides:
removein classAbstractList<VersionedReference>
-
getLastVersion
public long getLastVersion() -
getObjectVersion
public long getObjectVersion() -
needsUpdate
public boolean needsUpdate() -
update
public boolean update()
-