java.lang.Object
- All Implemented Interfaces:
Serializable,Cloneable,Iterable<MasterSerialEvent>,Collection<MasterSerialEvent>,List<MasterSerialEvent>,RandomAccess,SequencedCollection<MasterSerialEvent>,MasterSerial,MasterSerialEvent
public class MasterSerialListEvent
extends ArrayList<MasterSerialEvent>
implements MasterSerialEvent
A master serial event containing a list of events.
This event type is used, whenever there is more than one event pending for the client.
This event type is used, whenever there is more than one event pending for the client.
Important: adding an event should only be done via add(MasterSerialEvent) and
no other method, because the other methods (such as addAll, addFirst, etc...) are not overridden
to check for MasterSerialEvent.isOverridingOlderEvents()!
- See Also:
-
Field Summary
Fields inherited from class java.util.AbstractList
modCount -
Constructor Summary
ConstructorsConstructorDescriptionCreates an empty list event.MasterSerialListEvent(Collection<MasterSerialEvent> masterSerialEvents) Creates a list event. -
Method Summary
Modifier and TypeMethodDescriptionbooleanadd(MasterSerialEvent event) longserial()Gets the serial value.voidsetSerial(long serial) Sets the serial value.Methods inherited from class java.util.ArrayList
add, addAll, addAll, addFirst, addLast, clear, clone, contains, ensureCapacity, equals, forEach, get, getFirst, getLast, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeFirst, removeIf, removeLast, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSizeMethods inherited from class java.util.AbstractCollection
containsAll, toStringMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, stream, toArrayMethods inherited from interface java.util.List
containsAll, reversedMethods inherited from interface org.tentackle.session.MasterSerialEvent
isOverridingEvent, isOverridingOlderEvents
-
Constructor Details
-
MasterSerialListEvent
Creates a list event.- Parameters:
masterSerialEvents- the list of events
-
MasterSerialListEvent
public MasterSerialListEvent()Creates an empty list event.
-
-
Method Details
-
add
- Specified by:
addin interfaceCollection<MasterSerialEvent>- Specified by:
addin interfaceList<MasterSerialEvent>- Overrides:
addin classArrayList<MasterSerialEvent>
-
setSerial
public void setSerial(long serial) Description copied from interface:MasterSerialEventSets the serial value.- Specified by:
setSerialin interfaceMasterSerialEvent- Parameters:
serial- the serial
-
serial
public long serial()Description copied from interface:MasterSerialGets the serial value.- Specified by:
serialin interfaceMasterSerial- Returns:
- the serial
-