Interface RandomAccessPath
- All Superinterfaces:
Iterable<Path.Node>, Path, Path, RandomAccess
An extended representation of the validation path, provides Hibernate Validator specific functionality.
Represents a path with access to the nodes by their index.
- Since:
- 9.1
-
Nested Class Summary
Nested classes/interfaces inherited from interface Path
Path.BeanNode, Path.ConstructorNode, Path.ContainerElementNode, Path.CrossParameterNode, Path.MethodNode, Path.Node, Path.ParameterNode, Path.PropertyNode, Path.ReturnValueNode -
Method Summary
Methods inherited from interface Iterable
forEach, iterator, spliteratorMethods inherited from interface Path
getLeafNode
-
Method Details
-
getRootNode
Path.Node getRootNode()- Returns:
- The first node in the path, i.e.
path.iterator().next().
-
getNode
- Parameters:
index- The index of the node to return.- Returns:
- The node in the path for a given index.
- Throws:
IndexOutOfBoundsException- if the index is out of range, i.e.index < 0 || index >= length()
-
length
int length()- Returns:
- The length of the path, i.e. the number of nodes this path contains.
-