@Test public void get_kind() throws Exception { assertThat(tree.is(Kind.SCRIPT)).isTrue(); assertThat(tree.is(Kind.ARRAY_LITERAL)).isFalse(); }
@Override public final boolean is(Kinds... kind) { if (getKind() != null) { for (Kinds kindIter : kind) { if (kindIter.contains(getKind())) { return true; } } } return false; }
JavaScriptTree implements Tree { @Override public final boolean is(Kinds... kind) { if (getKind() != null) { for (Kinds kindIter : kind) { if (kindIter.contains(getKind())) { return true; } } } return false; } }
JavaScriptTree implements Tree { @Override public final boolean is(Kinds... kind) { if (getKind() != null) { for (Kinds kindIter : kind) { if (kindIter.contains(getKind())) { return true; } } } return false; }  }
JavaScriptTree implements Tree { @Override public final boolean is(Kinds... kind) { if (getKind() != null) { for (Kinds kindIter : kind) { if (kindIter.contains(getKind())) { return true; } } } return false; }  @Override final boolean is(Kinds... kind); abstract Kind getKind(); abstract Iterator<Tree> childrenIterator(); boolean isLeaf(); @Override SyntaxToken lastToken(); @Override SyntaxToken firstToken(); @Override boolean isAncestorOf(Tree tree); @Override Stream<JavaScriptTree> descendants(); @Override Stream<Tree> childrenStream(); void setParent(Tree parent); @Override Tree parent(); @Override String toString(); }
JavaScriptTree implements Tree { @Override public final boolean is(Kinds... kind) { if (getKind() != null) { for (Kinds kindIter : kind) { if (kindIter.contains(getKind())) { return true; } } } return false; }  @Override final boolean is(Kinds... kind); abstract Kind getKind(); abstract Iterator<Tree> childrenIterator(); boolean isLeaf(); @Override SyntaxToken lastToken(); @Override SyntaxToken firstToken(); @Override boolean isAncestorOf(Tree tree); @Override Stream<JavaScriptTree> descendants(); @Override Stream<Tree> childrenStream(); void setParent(Tree parent); @Override Tree parent(); @Override String toString();  }