@Test public void shouldReturnIteratorWithRootPathFromPathsFromRoot() { Iterator<Path> iter = root.pathsFromRoot(); assertThat(iter.hasNext(), is(true)); assertThat(iter.next(), is(root)); assertThat(iter.hasNext(), is(false)); }
@Override public Iterator<Path> pathsFromRoot() { return new SingleIterator<Path>(this); }
RootPath extends AbstractPath { @Override public Iterator<Path> pathsFromRoot() { return new SingleIterator<Path>(this); } }
RootPath extends AbstractPath { @Override public Iterator<Path> pathsFromRoot() { return new SingleIterator<Path>(this); } private  RootPath(); }
RootPath extends AbstractPath { @Override public Iterator<Path> pathsFromRoot() { return new SingleIterator<Path>(this); } private  RootPath(); @Override Path getAncestor( int degree ); @Override Path getCanonicalPath(); @Override Path getCommonAncestor( Path that ); @Override Segment getLastSegment(); @Override boolean endsWith( Name nameOfLastSegment ); @Override boolean endsWith( Name nameOfLastSegment,
                             int snsIndex ); @Override Path getNormalizedPath(); @Override Path relativeToRoot(); @Override Path resolve( Path relativePath ); @Override Path getParent(); @Override Segment getSegment( int index ); @Override Segment[] getSegmentsArray(); @Override List<Segment> getSegmentsList(); @Override String getString(); @Override String getString( TextEncoder encoder ); @Override String getString( NamespaceRegistry namespaceRegistry ); @Override String getString( NamespaceRegistry namespaceRegistry,
                             TextEncoder encoder ); @Override String getString( NamespaceRegistry namespaceRegistry,
                             TextEncoder encoder,
                             TextEncoder delimiterEncoder ); @Override boolean hasSameAncestor( Path that ); @Override boolean isAbsolute(); @Override boolean isAncestorOf( Path descendant ); @Override boolean isAtOrAbove( Path other ); @Override boolean isAtOrBelow( Path other ); @Override boolean isDescendantOf( Path ancestor ); @Override boolean isNormalized(); @Override boolean isRoot(); @Override boolean isSameAs( Path other ); @Override Iterator<Segment> iterator(); @Override Iterator<Path> pathsFromRoot(); @Override int size(); @Override Path subpath( int beginIndex ); @Override Path subpath( int beginIndex,
                         int endIndex ); @Override int compareTo( Path other ); @Override boolean equals( Object obj ); @Override int hashCode(); }
RootPath extends AbstractPath { @Override public Iterator<Path> pathsFromRoot() { return new SingleIterator<Path>(this); } private  RootPath(); @Override Path getAncestor( int degree ); @Override Path getCanonicalPath(); @Override Path getCommonAncestor( Path that ); @Override Segment getLastSegment(); @Override boolean endsWith( Name nameOfLastSegment ); @Override boolean endsWith( Name nameOfLastSegment,
                             int snsIndex ); @Override Path getNormalizedPath(); @Override Path relativeToRoot(); @Override Path resolve( Path relativePath ); @Override Path getParent(); @Override Segment getSegment( int index ); @Override Segment[] getSegmentsArray(); @Override List<Segment> getSegmentsList(); @Override String getString(); @Override String getString( TextEncoder encoder ); @Override String getString( NamespaceRegistry namespaceRegistry ); @Override String getString( NamespaceRegistry namespaceRegistry,
                             TextEncoder encoder ); @Override String getString( NamespaceRegistry namespaceRegistry,
                             TextEncoder encoder,
                             TextEncoder delimiterEncoder ); @Override boolean hasSameAncestor( Path that ); @Override boolean isAbsolute(); @Override boolean isAncestorOf( Path descendant ); @Override boolean isAtOrAbove( Path other ); @Override boolean isAtOrBelow( Path other ); @Override boolean isDescendantOf( Path ancestor ); @Override boolean isNormalized(); @Override boolean isRoot(); @Override boolean isSameAs( Path other ); @Override Iterator<Segment> iterator(); @Override Iterator<Path> pathsFromRoot(); @Override int size(); @Override Path subpath( int beginIndex ); @Override Path subpath( int beginIndex,
                         int endIndex ); @Override int compareTo( Path other ); @Override boolean equals( Object obj ); @Override int hashCode(); static final Path INSTANCE; }