Package io.ably.lib.objects.type.counter
Class LiveCounterUpdate
java.lang.Object
io.ably.lib.objects.type.ObjectUpdate
io.ably.lib.objects.type.counter.LiveCounterUpdate
Represents an update that occurred on a LiveCounter object.
Contains information about counter value changes from increment/decrement operations.
Updates can represent positive changes (increments) or negative changes (decrements).
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classContains the specific details of a counter update operation. -
Field Summary
Fields inherited from class io.ably.lib.objects.type.ObjectUpdate
update -
Constructor Summary
ConstructorsConstructorDescriptionCreates a no-op LiveCounterUpdate representing no actual change.LiveCounterUpdate(@NotNull Double amount) Creates a LiveCounterUpdate with the specified amount change. -
Method Summary
Modifier and TypeMethodDescriptionGets the update information containing the amount of change.toString()Returns a string representation of this LiveCounterUpdate.
-
Constructor Details
-
LiveCounterUpdate
public LiveCounterUpdate()Creates a no-op LiveCounterUpdate representing no actual change. -
LiveCounterUpdate
Creates a LiveCounterUpdate with the specified amount change.- Parameters:
-
amount- the amount by which the counter changed (positive = increment, negative = decrement)
-
-
Method Details
-
getUpdate
Gets the update information containing the amount of change.- Returns:
- the Update object with the counter modification amount
-
toString
Returns a string representation of this LiveCounterUpdate.
-