@see Node#children()
| 1910 | * @see Node#children() |
| 1911 | */ |
| 1912 | private static final class SiblingNodeIterator implements Iterator<Node> { |
| 1913 | private @Nullable Node current; |
| 1914 | |
| 1915 | SiblingNodeIterator(Node start) { |
| 1916 | this.current = start; |
| 1917 | } |
| 1918 | |
| 1919 | @Override |
| 1920 | public boolean hasNext() { |
| 1921 | return current != null; |
| 1922 | } |
| 1923 | |
| 1924 | @Override |
| 1925 | public Node next() { |
| 1926 | if (current == null) { |
| 1927 | throw new NoSuchElementException(); |
| 1928 | } |
| 1929 | Node n = current; |
| 1930 | current = current.getNext(); |
| 1931 | return n; |
| 1932 | } |
| 1933 | |
| 1934 | @Override |
| 1935 | public void remove() { |
| 1936 | throw new UnsupportedOperationException(); |
| 1937 | } |
| 1938 | } |
| 1939 | |
| 1940 | // ========================================================================== |
| 1941 | // Accessors |
nothing calls this directly
no outgoing calls
no test coverage detected