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 TypeMethodDescriptionvoid
add
(int index, VersionedReference element) void
void
addReferences
(VersionedObject... objects) static VersionedReferenceList
create
(VersionedObject... objects) get
(int index) long
long
boolean
remove
(int index) boolean
set
(int index, VersionedReference element) int
size()
boolean
update()
Methods inherited from class java.util.AbstractList
add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, removeRange, subList
Methods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, 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
Methods 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:
get
in interfaceList<VersionedReference>
- Specified by:
get
in classAbstractList<VersionedReference>
-
size
public int size()- Specified by:
size
in interfaceCollection<VersionedReference>
- Specified by:
size
in interfaceList<VersionedReference>
- Specified by:
size
in classAbstractCollection<VersionedReference>
-
set
- Specified by:
set
in interfaceList<VersionedReference>
- Overrides:
set
in classAbstractList<VersionedReference>
-
add
- Specified by:
add
in interfaceList<VersionedReference>
- Overrides:
add
in classAbstractList<VersionedReference>
-
remove
- Specified by:
remove
in interfaceList<VersionedReference>
- Overrides:
remove
in classAbstractList<VersionedReference>
-
getLastVersion
public long getLastVersion() -
getObjectVersion
public long getObjectVersion() -
needsUpdate
public boolean needsUpdate() -
update
public boolean update()
-