Record Class Dynamic<T>
java.lang.Object
java.lang.Record
com.github.darksoulq.abyssallib.common.serialization.Dynamic<T>
- Type Parameters:
T- the serialized value type
A wrapper around a serialized value and its associated
DynamicOps
implementation.
This class provides a fluent API for querying, modifying, and converting dynamic data structures without repeatedly passing the operations instance.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<R> Dynamic<R> convert(DynamicOps<R> outOps) Converts the wrapped value to a different serialized format.Applies a transformation to the value located at the specified path.final booleanIndicates whether some other object is "equal to" this one.Retrieves a nested value using a compiled path.Retrieves a nested value using a path expression.final inthashCode()Returns a hash code value for this object.ops()Returns the operations implementation associated with this value.Removes the value located at the specified path.Sets a value at the specified path using another dynamic wrapper.Sets a value at the specified path.final StringtoString()Returns a string representation of this record class.value()Returns the wrapped serialized value.
-
Constructor Details
-
Dynamic
Creates a new dynamic wrapper.- Parameters:
ops- the operations implementation associated with the valuevalue- the wrapped serialized value
-
-
Method Details
-
ops
Returns the operations implementation associated with this value.- Returns:
- the operations implementation
-
value
-
get
-
get
-
set
-
set
-
edit
-
remove
-
convert
Converts the wrapped value to a different serialized format.- Type Parameters:
R- the target serialized value type- Parameters:
outOps- the target operations implementation- Returns:
- a dynamic wrapper containing the converted value
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object).
-