Class BooleanConstant
java.lang.Object
org.apache.sling.scripting.sightly.compiler.expression.nodes.BooleanConstant
- All Implemented Interfaces:
ExpressionNode,Atom
Defines a Boolean constant (e.g. "true" or "false").
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionBooleanConstant(boolean value) Creates a boolean constant from a boolean value.BooleanConstant(String text) Creates a boolean constant from a raw string. -
Method Summary
-
Field Details
-
FALSE
-
TRUE
-
-
Constructor Details
-
BooleanConstant
Creates a boolean constant from a raw string.- Parameters:
text- the raw string
-
BooleanConstant
public BooleanConstant(boolean value) Creates a boolean constant from a boolean value.- Parameters:
value- the value from which this constant is created
-
-
Method Details
-
getValue
public boolean getValue()Returns the boolean value of the constant.- Returns:
- the boolean value of the constant
-
getText
Description copied from interface:AtomGet the text content for this nodes -
accept
Description copied from interface:ExpressionNodeAccept a visitor to process this node.- Specified by:
acceptin interfaceExpressionNode- Type Parameters:
T- the type of the visitor- Parameters:
visitor- The visitor- Returns:
- the node after it has been evaluated by the visitor
-
toString
-