コード例 #1
0
 private void validateLinked(Node node) {
   if (node.getNext() == null && node.getParent() == null) {
     throw new IllegalStateException("Added block " + node + " is not linked into the AST");
   }
 }
コード例 #2
0
 private void validateUnlinked(Node node) {
   if (!(node.getNext() == null && node.getParent() == null)) {
     throw new IllegalStateException("Removed block " + node + " is still linked in the AST");
   }
 }