183184185186187188189190191192193
current = start; } private void next() { assertNotNull(current); Node next; if ((next = current.getFirstChild()) != null) { current = next; } else { while (current != null && (next = current.getNextSibling()) == null) { current = current.getParent();
116117118119120121122123124125
}); } private static void assertFirstChildSymmetry(Node n) { Node c = n.getFirstChild(); if (c != null) { assertSame(c.getParent(), n); } }
123124125126127128129130131132
assertSame(c.getParent(), n); } } private static void assertLastChildSymmetry(Node n) { Node c = n.getLastChild(); if (c != null) { assertSame(c.getParent(), n); } }
130131132133134135136137138139
assertSame(c.getParent(), n); } } private static void assertNextSiblingSymmetry(Node n) { Node s = n.getNextSibling(); if (s != null) { assertSame(s.getPreviousSibling(), n); } }
137138139140141142143144145146
assertSame(s.getPreviousSibling(), n); } } private static void assertPreviousSiblingSymmetry(Node n) { Node s = n.getPreviousSibling(); if (s != null) { assertSame(s.getNextSibling(), n); } }