Interface RandomAccessPath

All Superinterfaces:
Iterable<Path.Node>, Path, Path, RandomAccess

@Incubating public interface RandomAccessPath extends 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
  • Method Details

    • getRootNode

      Path.Node getRootNode()
      Returns:
      The first node in the path, i.e. path.iterator().next().
    • getNode

      Path.Node getNode(int index)
      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.