public final class Number extends PrimaryItem
| Modifier and Type | Field and Description |
|---|---|
static int |
SIZE |
| Constructor and Description |
|---|
Number(IrpParser.NumberContext ctx) |
Number(Number n) |
Number(String str) |
Number(org.antlr.v4.runtime.tree.TerminalNode n) |
| Modifier and Type | Method and Description |
|---|---|
(package private) long |
and(long mask) |
boolean |
constant(NameEngine nameEngine) |
boolean |
equals(Object obj) |
String |
formatIntegerWithLeadingZeros(int radix,
int length) |
int |
hashCode() |
BitwiseParameter |
invert(BitwiseParameter rhs,
RecognizeData nameEngine)
Default implementation, for non-invertible expressions.
|
boolean |
isZero() |
PrimaryItem |
leftHandSide()
Default implementation.
|
long |
longValueExact() |
(package private) static NumberExpression |
newExpression(IrpParser.NumberContext child) |
(package private) static NumberExpression |
newExpression(String str) |
(package private) static Number |
parse(IrpParser.NumberContext ctx) |
static Number |
parse(String str) |
static Number |
parse(String str,
int radix) |
Map<String,Object> |
propertiesMap(boolean eval,
GeneralSpec generalSpec,
NameEngine nameEngine)
Generate a map of the properties in the very object.
|
Number |
shiftRight(int n) |
PrimaryItem |
substituteConstantVariables(Map<String,Long> constantVariables)
Returns a PrimaryItem of the same type with all occurrences of the
variables in the dictionary replaced by their values in the dictionary.
|
boolean |
testBit(int n) |
BitwiseParameter |
toBitwiseParameter(RecognizeData recognizeData) |
Element |
toElement(Document document) |
String |
toIrpString(int radix) |
long |
toLong() |
long |
toLong(NameEngine nameEngine)
Produces a numerical result.
|
String |
toString(int radix) |
int |
weight()
Returns a (somewhat arbitrary) measure of the complexity of the object.
|
newPrimaryItem, newPrimaryItem, newPrimaryItemgetParseTree, numberOfBits, numberOfBitSpecs, numberOfInfiniteRepeats, prerender, propertiesMap, stateWhenEntering, stateWhenExiting, toDocument, toIrpString, toString, toStringTree, toStringTree, toTreeViewer, toTreeViewer, toTreeViewerpublic static final int SIZE
public Number(Number n)
public Number(IrpParser.NumberContext ctx)
public Number(org.antlr.v4.runtime.tree.TerminalNode n)
public Number(String str)
static NumberExpression newExpression(IrpParser.NumberContext child)
static NumberExpression newExpression(String str)
static Number parse(IrpParser.NumberContext ctx)
public long longValueExact()
throws ArithmeticException
ArithmeticExceptionpublic boolean isZero()
public Number shiftRight(int n)
long and(long mask)
public String toString(int radix)
public long toLong(NameEngine nameEngine) throws ArithmeticException
NumericalnameEngine - used to resolve names in expressions.ArithmeticExceptionpublic BitwiseParameter toBitwiseParameter(RecognizeData recognizeData)
public long toLong()
throws ArithmeticException
ArithmeticExceptionpublic String toIrpString(int radix)
toIrpString in class PrimaryItempublic int weight()
IrpObjectpublic Map<String,Object> propertiesMap(boolean eval, GeneralSpec generalSpec, NameEngine nameEngine)
PrimaryItempropertiesMap in class PrimaryItemeval - If true, evaluate names.public BitwiseParameter invert(BitwiseParameter rhs, RecognizeData nameEngine)
PrimaryIteminvert in interface EquationSolvinginvert in class PrimaryItempublic PrimaryItem leftHandSide()
PrimaryItemleftHandSide in interface EquationSolvingleftHandSide in class PrimaryItempublic PrimaryItem substituteConstantVariables(Map<String,Long> constantVariables)
PrimaryItemsubstituteConstantVariables in class PrimaryItemconstantVariables - Map<String, Long> of variables to replace.public String formatIntegerWithLeadingZeros(int radix, int length)
public boolean testBit(int n)
public boolean constant(NameEngine nameEngine)
constant in class PrimaryItemCopyright © 2019. All rights reserved.