@Test public void iterator() throws Exception { assertThat(new Extended(EmptyPath.INSTANCE, EmptyPath.INSTANCE), new IsEmptyIterable<UriEncoded>()); assertThat(new Extended(EmptyPath.INSTANCE, new EncodedPath(new Precoded("/"))), Matchers.contains((UriEncoded) IdempotentEncoded.EMPTY, IdempotentEncoded.EMPTY)); assertThat(new Extended(new EncodedPath(new Precoded("/")), EmptyPath.INSTANCE), Matchers.contains((UriEncoded) IdempotentEncoded.EMPTY, IdempotentEncoded.EMPTY)); assertThat(new Extended(new EncodedPath(new Precoded("/")), new EncodedPath(new Precoded("c"))), Matchers.contains((UriEncoded) IdempotentEncoded.EMPTY, new Encoded("c"))); assertThat(new Extended(new EncodedPath(new Precoded("/")), new EncodedPath(new Precoded("./c"))), Matchers.contains((UriEncoded) IdempotentEncoded.EMPTY, new Encoded("c"))); assertThat(new Extended(new EncodedPath(new Precoded("/")), new EncodedPath(new Precoded("../c"))), Matchers.contains((UriEncoded) IdempotentEncoded.EMPTY, new Encoded("c"))); assertThat(new Extended(new EncodedPath(new Precoded("a")), new EncodedPath(new Precoded("c"))), Matchers.contains((UriEncoded) new Encoded("a"), new Encoded("c"))); assertThat(new Extended(new EncodedPath(new Precoded("a")), new EncodedPath(new Precoded("./c"))), Matchers.contains((UriEncoded) new Encoded("a"), new Encoded("c"))); assertThat(new Extended(new EncodedPath(new Precoded("a")), new EncodedPath(new Precoded("../c"))), Matchers.contains((UriEncoded) new Encoded("c"))); assertThat(new Extended(new EncodedPath(new Precoded("/a")), new EncodedPath(new Precoded("c"))), Matchers.contains((UriEncoded) IdempotentEncoded.EMPTY, new Encoded("a"), new Encoded("c"))); assertThat(new Extended(new EncodedPath(new Precoded("/a")), new EncodedPath(new Precoded("./c"))), Matchers.contains((UriEncoded) IdempotentEncoded.EMPTY, new Encoded("a"), new Encoded("c"))); assertThat(new Extended(new EncodedPath(new Precoded("/a")), new EncodedPath(new Precoded("../c"))), Matchers.contains((UriEncoded) IdempotentEncoded.EMPTY, new Encoded("c"))); assertThat(new Extended(new EncodedPath(new Precoded("a/b")), new EncodedPath(new Precoded("c"))), Matchers.contains((UriEncoded) new Encoded("a"), new Encoded("b"), new Encoded("c"))); assertThat(new Extended(new EncodedPath(new Precoded("a/b")), new EncodedPath(new Precoded("./c"))), Matchers.contains((UriEncoded) new Encoded("a"), new Encoded("b"), new Encoded("c"))); assertThat(new Extended(new EncodedPath(new Precoded("a/b")), new EncodedPath(new Precoded("../c"))), Matchers.contains((UriEncoded) new Encoded("a"), new Encoded("c"))); assertThat(new Extended(new EncodedPath(new Precoded("a/b")), new EncodedPath(new Precoded("../../."))), Matchers.contains((UriEncoded) IdempotentEncoded.CURRENT, IdempotentEncoded.EMPTY)); assertThat(new Extended(new EncodedPath(new Precoded("a/b")), new EncodedPath(new Precoded("../../.."))), Matchers.contains((UriEncoded) IdempotentEncoded.PARENT, IdempotentEncoded.EMPTY)); assertThat(new Extended(new StructuredPath(new Encoded("a"), new Encoded("b")), IdempotentEncoded.CURRENT, new Encoded("c")), Matchers.contains((UriEncoded) new Encoded("a"), new Encoded("b"), new Encoded("c"))); assertThat(new Extended(new StructuredPath(new Encoded("a"), new Encoded("b")), IdempotentEncoded.PARENT, new Encoded("c")), Matchers.contains((UriEncoded) new Encoded("a"), new Encoded("c"))); }
@Override public Iterator<UriEncoded> iterator() { return Collections.unmodifiableList(normalize(new SerialIterator<>(mDelegate.iterator(), mNewSegments.iterator()))).iterator(); }
Extended implements Path { @Override public Iterator<UriEncoded> iterator() { return Collections.unmodifiableList(normalize(new SerialIterator<>(mDelegate.iterator(), mNewSegments.iterator()))).iterator(); } }
Extended implements Path { @Override public Iterator<UriEncoded> iterator() { return Collections.unmodifiableList(normalize(new SerialIterator<>(mDelegate.iterator(), mNewSegments.iterator()))).iterator(); } Extended(Path delegate, UriEncoded... newSegments);  Extended(Path delegate, Path newSegments); private  Extended(Path delegate, Iterable<UriEncoded> newSegments); }
Extended implements Path { @Override public Iterator<UriEncoded> iterator() { return Collections.unmodifiableList(normalize(new SerialIterator<>(mDelegate.iterator(), mNewSegments.iterator()))).iterator(); } Extended(Path delegate, UriEncoded... newSegments);  Extended(Path delegate, Path newSegments); private  Extended(Path delegate, Iterable<UriEncoded> newSegments); @Override boolean isEmpty(); @Override boolean isAbsolute(); @Override Iterator<UriEncoded> iterator(); }
Extended implements Path { @Override public Iterator<UriEncoded> iterator() { return Collections.unmodifiableList(normalize(new SerialIterator<>(mDelegate.iterator(), mNewSegments.iterator()))).iterator(); } Extended(Path delegate, UriEncoded... newSegments);  Extended(Path delegate, Path newSegments); private  Extended(Path delegate, Iterable<UriEncoded> newSegments); @Override boolean isEmpty(); @Override boolean isAbsolute(); @Override Iterator<UriEncoded> iterator();  }