@Test public void shouldConsiderParentNotBeDecendantOfChildPath() { assertThat(parent.isDescendantOf(path), is(false)); }
@Override public boolean isDescendantOf( Path ancestor ) { if (parent == ancestor) return true; return parent.isAtOrBelow(ancestor); }
ChildPath extends AbstractPath { @Override public boolean isDescendantOf( Path ancestor ) { if (parent == ancestor) return true; return parent.isAtOrBelow(ancestor); } }
ChildPath extends AbstractPath { @Override public boolean isDescendantOf( Path ancestor ) { if (parent == ancestor) return true; return parent.isAtOrBelow(ancestor); } ChildPath( Path parent,
                      Path.Segment child ); }
ChildPath extends AbstractPath { @Override public boolean isDescendantOf( Path ancestor ) { if (parent == ancestor) return true; return parent.isAtOrBelow(ancestor); } ChildPath( Path parent,
                      Path.Segment child ); @Override Path getAncestor( int degree ); @Override Segment getLastSegment(); @Override Path getParent(); @Override Segment getSegment( int index ); @Override List<Segment> getSegmentsList(); @Override boolean hasSameAncestor( Path that ); @Override boolean isAbsolute(); @Override boolean isAtOrBelow( Path other ); @Override boolean isDescendantOf( Path ancestor ); @Override boolean isNormalized(); @Override boolean isRoot(); @Override @SuppressWarnings( "synthetic-access" ) Iterator<Segment> iterator(); @Override int size(); @Override Path subpath( int beginIndex,
                         int endIndex ); }
ChildPath extends AbstractPath { @Override public boolean isDescendantOf( Path ancestor ) { if (parent == ancestor) return true; return parent.isAtOrBelow(ancestor); } ChildPath( Path parent,
                      Path.Segment child ); @Override Path getAncestor( int degree ); @Override Segment getLastSegment(); @Override Path getParent(); @Override Segment getSegment( int index ); @Override List<Segment> getSegmentsList(); @Override boolean hasSameAncestor( Path that ); @Override boolean isAbsolute(); @Override boolean isAtOrBelow( Path other ); @Override boolean isDescendantOf( Path ancestor ); @Override boolean isNormalized(); @Override boolean isRoot(); @Override @SuppressWarnings( "synthetic-access" ) Iterator<Segment> iterator(); @Override int size(); @Override Path subpath( int beginIndex,
                         int endIndex );  }