Package io.ably.lib.liveobjects.value
Class LiveMap
java.lang.Object
io.ably.lib.liveobjects.value.LiveMap
An immutable value type representing the intent to create a new
LiveMap object with specific initial entries. Passed to mutation
methods (such as LiveMapInstance#set or LiveMapPathObject#set,
wrapped via LiveMapValue.of(LiveMap)) to assign a new LiveMap
to the objects graph. Entries may themselves contain nested LiveMap /
LiveCounter value types, enabling composable object structures.
This type is a holder for the initial value only - it is not a live,
subscribable view of channel state. The MAP_CREATE operation it gives
rise to is published when the enclosing mutation is applied.
Instances are obtained via the static create(Map) factory and
are immutable after creation. The initial entries are held internally by the
implementation; they have no public accessor.
Spec: RTLMV1, RTLMV2, RTLMV3
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedLiveMap()Extended by the LiveObjects implementation; not intended for application subclassing. -
Method Summary
-
Constructor Details
-
LiveMap
protected LiveMap()Extended by the LiveObjects implementation; not intended for application subclassing. Avoids implicit empty public constructor.
-
-
Method Details
-
create
Creates a newLiveMapvalue type with no initial entries.Spec: RTLMV3, RTLMV3a1, RTLMV3b
- Returns:
- an immutable
LiveMapvalue type - Throws:
-
IllegalStateException- if the LiveObjects plugin is not on the classpath
-
create
Creates a newLiveMapvalue type with the given initial entries. No input validation is performed at creation time; validation is deferred to when the value is evaluated by a mutation method.Spec: RTLMV3, RTLMV3b, RTLMV3c, RTLMV3d
- Parameters:
-
entries- the initial entries for the newLiveMapobject - Returns:
- an immutable
LiveMapvalue type - Throws:
-
IllegalStateException- if the LiveObjects plugin is not on the classpath
-