java.lang.Object
de.haumacher.msgbuf.data.AbstractDataObject
de.haumacher.msgbuf.graph.cmd.Command
de.haumacher.msgbuf.graph.cmd.ListUpdate
- All Implemented Interfaces:
BinaryDataObject,DataObject,ReflectiveDataObject,Observable
- Direct Known Subclasses:
InsertElement,RemoveElement
Base class for operations internally changing the values of repeated properties.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceListUpdate.Visitor<R,A, E extends Throwable> Visitor interface for theListUpdatehierarchy.Nested classes/interfaces inherited from class de.haumacher.msgbuf.graph.cmd.Command
Command.TypeKind -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final intIdentifier for the propertygetIndex()in binary format.static final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionRetrieves value of the field with the given name.final intgetIndex()The list index that is modified.final ListUpdategetNext()Pointer to chain updates for the same property.final booleanhasNext()Checks, whethergetNext()has a value.All properties that are supported by this object.protected voidreadField(DataReader in, int field) Consumes the value for the field with the given ID and assigns its value.protected voidreadField(JsonReader in, String field) Reads the given field from the given input.static ListUpdateReads a new instance from the given reader.static ListUpdateReads a new instance from the given reader.voidSets the value of the property with the given name.final ListUpdatesetIndex(int value) final ListUpdatesetNext(ListUpdate value) final <R,A, E extends Throwable>
Rvisit(Command.Visitor<R, A, E> v, A arg) Accepts the given visitor.abstract <R,A, E extends Throwable>
Rvisit(ListUpdate.Visitor<R, A, E> v, A arg) Accepts the given visitor.protected voidwriteFields(DataWriter out) Serializes all fields of this instance to the given binary output.protected voidwriteFields(JsonWriter out) Writes all fields of this instance to the given output.Methods inherited from class de.haumacher.msgbuf.graph.cmd.Command
getId, getNode, getProperty, hasNode, kind, readCommand, readCommand, registerListener, setId, setNode, setProperty, typeId, unregisterListener, writeTo, writeToMethods inherited from class de.haumacher.msgbuf.data.AbstractDataObject
readContent, readFields, toString, writeContentMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface de.haumacher.msgbuf.data.ReflectiveDataObject
jsonType
-
Field Details
-
INDEX
- See Also:
-
NEXT
- See Also:
-
INDEX__ID
public static final int INDEX__IDIdentifier for the propertygetIndex()in binary format.- See Also:
-
-
Constructor Details
-
ListUpdate
protected ListUpdate()Creates aListUpdateinstance.
-
-
Method Details
-
getIndex
public final int getIndex()The list index that is modified. -
setIndex
- See Also:
-
getNext
Pointer to chain updates for the same property. -
setNext
- See Also:
-
hasNext
public final boolean hasNext()Checks, whethergetNext()has a value. -
properties
Description copied from interface:ReflectiveDataObjectAll properties that are supported by this object.- Specified by:
propertiesin interfaceReflectiveDataObject- Overrides:
propertiesin classCommand- See Also:
-
get
Description copied from interface:ReflectiveDataObjectRetrieves value of the field with the given name.- Specified by:
getin interfaceReflectiveDataObject- Overrides:
getin classCommand- Parameters:
field- The name of the property.- Returns:
- The value of the property with the given name.
- See Also:
-
set
Description copied from interface:ReflectiveDataObjectSets the value of the property with the given name.- Specified by:
setin interfaceReflectiveDataObject- Overrides:
setin classCommand- Parameters:
field- The name of the property to update.value- The new value of the property.- See Also:
-
readListUpdate
Reads a new instance from the given reader.- Throws:
IOException
-
writeFields
Description copied from class:AbstractDataObjectWrites all fields of this instance to the given output.- Overrides:
writeFieldsin classCommand- Parameters:
out- The writer to write to.- Throws:
IOException- If writing fails.
-
readField
Description copied from class:AbstractDataObjectReads the given field from the given input.- Overrides:
readFieldin classCommand- Parameters:
in- The reader to take the value from.field- The name of the field whose value should be read.- Throws:
IOException
-
writeFields
Description copied from class:CommandSerializes all fields of this instance to the given binary output.- Overrides:
writeFieldsin classCommand- Parameters:
out- The binary output to write to.- Throws:
IOException- If writing fails.
-
readListUpdate
Reads a new instance from the given reader.- Throws:
IOException
-
readField
Description copied from class:CommandConsumes the value for the field with the given ID and assigns its value.- Overrides:
readFieldin classCommand- Throws:
IOException
-
visit
Accepts the given visitor.- Throws:
E extends Throwable
-
visit
Description copied from class:CommandAccepts the given visitor.
-