Package io.keikai.doc.collab.utils
Class YEvent
java.lang.Object
io.keikai.doc.collab.utils.YEvent
- Direct Known Subclasses:
YArrayEvent,YMapEvent,YTextEvent,YXmlEvent
YEvent describes the changes on a YType.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected AbstractTypeThe current target on which the observe callback is called.protected final AbstractTypeThe type on which this event was created on.protected final TransactionThe transaction that triggered this event.static final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanadds(AbstractStruct struct) Check if a struct is added by this event.booleandeletes(AbstractStruct struct) Check if a struct is deleted by this event.Get the changes made in this event.getKeys()Get the changes made to the keys of this event's target.getPath()Computes the path from the YType to the changed type.voidsetCurrentTarget(AbstractType currentTarget) void
-
Field Details
-
ERROR_COMPUTE_CHANGES
- See Also:
-
_target
The type on which this event was created on. -
_currentTarget
The current target on which the observe callback is called. -
_transaction
The transaction that triggered this event.
-
-
Constructor Details
-
YEvent
-
-
Method Details
-
getTarget
-
setCurrentTarget
-
getTransaction
-
getPath
Computes the path from the YType to the changed type.- Returns:
- The path from the root type to the target.
-
setPath
-
deletes
Check if a struct is deleted by this event.- Parameters:
struct- The struct to check.- Returns:
- True if the struct is deleted, false otherwise.
-
adds
Check if a struct is added by this event.- Parameters:
struct- The struct to check.- Returns:
- True if the struct is added, false otherwise.
-
getKeys
Get the changes made to the keys of this event's target.- Returns:
- A map of the changes made to the keys.
-
getChanges
Get the changes made in this event.- Returns:
- The changes made.
-