@Test public void expectBooleanNodeReturnsBooleanNode() { Node trueNode = Node.from(true); Node falseNode = Node.from(false); assertThat(trueNode.expectBooleanNode(), instanceOf(BooleanNode.class)); assertThat(falseNode.expectBooleanNode(), instanceOf(BooleanNode.class)); }
@Override public BooleanNode expectBooleanNode(String errorMessage) { return this; }
BooleanNode extends Node { @Override public BooleanNode expectBooleanNode(String errorMessage) { return this; } }
BooleanNode extends Node { @Override public BooleanNode expectBooleanNode(String errorMessage) { return this; } BooleanNode(boolean value, SourceLocation sourceLocation); }
BooleanNode extends Node { @Override public BooleanNode expectBooleanNode(String errorMessage) { return this; } BooleanNode(boolean value, SourceLocation sourceLocation); boolean getValue(); @Override NodeType getType(); @Override R accept(NodeVisitor<R> visitor); @Override BooleanNode expectBooleanNode(String errorMessage); @Override Optional<BooleanNode> asBooleanNode(); @Override boolean equals(Object other); @Override int hashCode(); @Override String toString(); }
BooleanNode extends Node { @Override public BooleanNode expectBooleanNode(String errorMessage) { return this; } BooleanNode(boolean value, SourceLocation sourceLocation); boolean getValue(); @Override NodeType getType(); @Override R accept(NodeVisitor<R> visitor); @Override BooleanNode expectBooleanNode(String errorMessage); @Override Optional<BooleanNode> asBooleanNode(); @Override boolean equals(Object other); @Override int hashCode(); @Override String toString();  }