@Test public void shouldIterateOverAllSegmentsReturnedByList() { Iterator<Path.Segment> expectedIter = validSegmentsList.iterator(); for (Path.Segment segment : path) { assertThat(segment, is(expectedIter.next())); } expectedIter = path.getSegmentsList().iterator(); for (Path.Segment segment : path) { assertThat(segment, is(expectedIter.next())); } }
@Override public List<Segment> getSegmentsList() { return this.segments; }
BasicPath extends AbstractPath { @Override public List<Segment> getSegmentsList() { return this.segments; } }
BasicPath extends AbstractPath { @Override public List<Segment> getSegmentsList() { return this.segments; } BasicPath( List<Segment> segments,
                      boolean absolute ); }
BasicPath extends AbstractPath { @Override public List<Segment> getSegmentsList() { return this.segments; } BasicPath( List<Segment> segments,
                      boolean absolute ); @Override Path getAncestor( int degree ); @Override List<Segment> getSegmentsList(); @Override boolean isAbsolute(); @Override boolean isNormalized(); @Override boolean isRoot(); @Override int size(); }
BasicPath extends AbstractPath { @Override public List<Segment> getSegmentsList() { return this.segments; } BasicPath( List<Segment> segments,
                      boolean absolute ); @Override Path getAncestor( int degree ); @Override List<Segment> getSegmentsList(); @Override boolean isAbsolute(); @Override boolean isNormalized(); @Override boolean isRoot(); @Override int size(); static final Path EMPTY_RELATIVE; static final Path SELF_PATH; static final Path PARENT_PATH; }