Package io.debezium.document
Class Paths.MultiSegmentPath
- java.lang.Object
-
- io.debezium.document.Paths.MultiSegmentPath
-
- All Implemented Interfaces:
Path,Paths.InnerPath,Iterable<String>
- Enclosing class:
- Paths
static final class Paths.MultiSegmentPath extends Object implements Path, Paths.InnerPath
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.debezium.document.Path
Path.Segments
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedMultiSegmentPath(String[] segments)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Pathappend(Path relPath)Create a new path consisting of this path appended with the given path that will be treated as a relative path.intcopyInto(String[] segments, int start)booleanequals(Object obj)voidforEach(Consumer<? super String> consumer)inthashCode()Iterator<String>iterator()Optional<String>lastSegment()Get the last segment, if there is one.Optional<Path>parent()Get the optional parent path.Stringsegment(int index)Get the segment at the given index.intsize()Get the number of segments in the path.Pathsubpath(int length)Get a portion of this path that has a specified number of segments.StringtoRelativePath()Obtain the representation of this path as a relative path without the leading '/'.StringtoString()-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
spliterator
-
-
-
-
Field Detail
-
segments
private final String[] segments
-
hc
private final int hc
-
-
Constructor Detail
-
MultiSegmentPath
protected MultiSegmentPath(String[] segments)
-
-
Method Detail
-
parent
public Optional<Path> parent()
Description copied from interface:PathGet the optional parent path.
-
lastSegment
public Optional<String> lastSegment()
Description copied from interface:PathGet the last segment, if there is one.- Specified by:
lastSegmentin interfacePath- Returns:
- an optional containing the last segment of this path (if this is not the root path), or an empty optional if this is the root path.
-
size
public int size()
Description copied from interface:PathGet the number of segments in the path.
-
toRelativePath
public String toRelativePath()
Description copied from interface:PathObtain the representation of this path as a relative path without the leading '/'.- Specified by:
toRelativePathin interfacePath- Returns:
- the relative path; never null but may be empty
-
subpath
public Path subpath(int length)
Description copied from interface:PathGet a portion of this path that has a specified number of segments.
-
segment
public String segment(int index)
Description copied from interface:PathGet the segment at the given index.
-
append
public Path append(Path relPath)
Description copied from interface:PathCreate a new path consisting of this path appended with the given path that will be treated as a relative path.
-
copyInto
public int copyInto(String[] segments, int start)
- Specified by:
copyIntoin interfacePaths.InnerPath
-
-