Package org.spongepowered.configurate
Interface NodePath
Represents the path to a given node.
- Since:
- 4.0.0
- 
Method SummaryModifier and TypeMethodDescriptionObject[]array()Returns a copy of the original path array.copy()Create a new node path with the same data as this path.get(int i) Gets a specific element from the path array.iterator()Returns an iterator over the path.static NodePathCreate a node path reference.static NodePathof(Collection<?> path) Create a node path reference.static NodePathpath()Get an empty node path.static NodePathCreate a node path reference.Create a new path from the combination ofthisandother.intsize()Gets the length of the path.Create a new path with the value atindexreplaced withvalue.withAppendedChild(Object childKey) Create a new path with the provided element appended to the end.Methods inherited from interface java.lang.IterableforEach, spliterator
- 
Method Details- 
ofCreate a node path reference.- Parameters:
- path- the path to reference. The provided array will be copied.
- Returns:
- the path instance
- Since:
- 4.0.0
 
- 
ofCreate a node path reference.- Parameters:
- path- a collection containing elements of the path to reference
- Returns:
- the path instance
- Since:
- 4.0.0
 
- 
pathCreate a node path reference.This overload takes varargs, and is designed to be imported statically to create paths. - Parameters:
- elements- the path to reference. The provided array will be copied.
- Returns:
- the path instance
- Since:
- 4.0.0
 
- 
pathGet an empty node path. This refers to the root node.- Returns:
- the empty path
- Since:
- 4.0.0
 
- 
getGets a specific element from the path array.- Parameters:
- i- the index to get
- Returns:
- object at the index
- Since:
- 4.0.0
 
- 
sizeint size()Gets the length of the path.- Returns:
- length of the path array
- Since:
- 4.0.0
 
- 
arrayReturns a copy of the original path array.- Returns:
- the copied array
- Since:
- 4.0.0
 
- 
withAppendedChildCreate a new path with the provided element appended to the end.- Parameters:
- childKey- the new key to append
- Returns:
- a new path object reflecting the extended path
- Since:
- 4.0.0
 
- 
withCreate a new path with the value atindexreplaced withvalue.- Parameters:
- index- position to change
- value- value to insert
- Returns:
- new path object with changed value
- Throws:
- IndexOutOfBoundsException- if index < 0 or ≥ size()
- Since:
- 4.0.0
 
- 
plusCreate a new path from the combination ofthisandother.- Parameters:
- other- the path to append
- Returns:
- a new path, containing the elements of this path followed by the
      elements of other.
- Since:
- 4.1.0
 
- 
iteratorReturns an iterator over the path.
- 
copyCreate a new node path with the same data as this path.- Returns:
- a new path
- Since:
- 4.0.0
 
 
-