Class NumericConstant
java.lang.Object
org.apache.sling.scripting.sightly.compiler.expression.nodes.NumericConstant
- All Implemented Interfaces:
- ExpressionNode,- Atom
Defines a numeric constant expression (e.g. "42.1").
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final NumericConstantstatic final NumericConstantstatic final NumericConstant
- 
Constructor SummaryConstructorsConstructorDescriptionNumericConstant(Number value) Creates a numeric constant based on aNumberrepresentation.NumericConstant(String text) Creates a numeric constant.
- 
Method Summary
- 
Field Details- 
ZERO
- 
ONE
- 
TWO
 
- 
- 
Constructor Details- 
NumericConstantCreates a numeric constant.- Parameters:
- text- the text representation
- Throws:
- NumberFormatException- if the text is not in a numeric format
 
- 
NumericConstantCreates a numeric constant based on aNumberrepresentation.- Parameters:
- value- the number representation
 
 
- 
- 
Method Details- 
getValueReturns the number representation of this constant.- Returns:
- the number representation of this constant
 
- 
getTextDescription copied from interface:AtomGet the text content for this nodes
- 
acceptDescription copied from interface:ExpressionNodeAccept a visitor to process this node.- Specified by:
- acceptin interface- ExpressionNode
- Type Parameters:
- T- the type of the visitor
- Parameters:
- visitor- The visitor
- Returns:
- the node after it has been evaluated by the visitor
 
- 
toString
 
-