Package io.debezium.document
Class Paths.RootPath
- java.lang.Object
-
- io.debezium.document.Paths.RootPath
-
- All Implemented Interfaces:
Path
,Paths.InnerPath
,Iterable<String>
- Enclosing class:
- Paths
static final class Paths.RootPath extends Object implements Path, Paths.InnerPath
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.debezium.document.Path
Path.Segments
-
-
Field Summary
Fields Modifier and Type Field Description static Path
INSTANCE
static Optional<Path>
OPTIONAL_OF_ROOT
-
Constructor Summary
Constructors Modifier Constructor Description private
RootPath()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Path
append(Path relPath)
Create a new path consisting of this path appended with the given path that will be treated as a relative path.int
copyInto(String[] segments, int start)
boolean
equals(Object obj)
void
forEach(Consumer<? super String> consumer)
int
hashCode()
Iterator<String>
iterator()
Optional<String>
lastSegment()
Get the last segment, if there is one.Optional<Path>
parent()
Get the optional parent path.String
segment(int index)
Get the segment at the given index.int
size()
Get the number of segments in the path.Path
subpath(int length)
Get a portion of this path that has a specified number of segments.String
toRelativePath()
Obtain the representation of this path as a relative path without the leading '/'.String
toString()
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
spliterator
-
-
-
-
Method Detail
-
parent
public Optional<Path> parent()
Description copied from interface:Path
Get the optional parent path.
-
lastSegment
public Optional<String> lastSegment()
Description copied from interface:Path
Get the last segment, if there is one.- Specified by:
lastSegment
in 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:Path
Get the number of segments in the path.
-
toRelativePath
public String toRelativePath()
Description copied from interface:Path
Obtain the representation of this path as a relative path without the leading '/'.- Specified by:
toRelativePath
in interfacePath
- Returns:
- the relative path; never null but may be empty
-
subpath
public Path subpath(int length)
Description copied from interface:Path
Get a portion of this path that has a specified number of segments.
-
segment
public String segment(int index)
Description copied from interface:Path
Get the segment at the given index.
-
append
public Path append(Path relPath)
Description copied from interface:Path
Create 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:
copyInto
in interfacePaths.InnerPath
-
-