Package space.arim.dazzleconf.backend
Class KeyPath.Immut
java.lang.Object
space.arim.dazzleconf.backend.KeyPath
space.arim.dazzleconf.backend.KeyPath.Immut
- All Implemented Interfaces:
Printable
- Enclosing class:
KeyPath
A key path which is unmistakably immutable.
-
Nested Class Summary
Nested classes/interfaces inherited from class space.arim.dazzleconf.backend.KeyPath
KeyPath.Immut, KeyPath.Mut, KeyPath.SequenceBoundaryNested classes/interfaces inherited from interface space.arim.dazzleconf.backend.Printable
Printable.Abstract -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@NonNull KeyPath.ImmutGets this key path as an immutable one.@NonNull KeyPath.MutintoMut()Gets this key path as a mutable one.Methods inherited from class space.arim.dazzleconf.backend.KeyPath
empty, equals, forEach, getLeading, hashCode, intoParts, intoPartsList, isEmpty, iterateFrom, printString, printTo, printTo, size, toString
-
Constructor Details
-
Immut
public Immut()Creates an empty key path -
Immut
Creates from the given parts- Parameters:
parts- the parts
-
Immut
Creates from another key path.This will copy the parts of that key path into this one.
- Parameters:
other- the other key path
-
-
Method Details
-
intoMut
Description copied from class:KeyPathGets this key path as a mutable one.If not mutable, the data is copied to a new key path which is returned. This copying may be performed lazily, such as by deferring to the first mutative operation on the returned object.
-
intoImmut
Description copied from class:KeyPathGets this key path as an immutable one.The data contained within this
KeyPathis moved to an immutable instance. The old instance may still be used, but the implementation of this method may be optimized for the case that it is not.If this instance is already
DataTree.Immut, then it may be returned without changes.
-