public class Const extends Expr
Modifier and Type | Field and Description |
---|---|
static Const |
FALSE |
static Const |
NULL |
static Const |
TRUE |
Constructor and Description |
---|
Const(Sym type,
Object value)
INT LONG FLOAT DOUBLE 常量已在 NumTok 中转换成了确切的类型,无需再次转换
|
Modifier and Type | Method and Description |
---|---|
Object |
eval(Scope scope) |
Boolean |
getBoolean() |
Double |
getDouble() |
Float |
getFloat() |
Integer |
getInt() |
Long |
getLong() |
Number |
getNumber() |
String |
getStr() |
Object |
getValue() |
boolean |
isBoolean() |
boolean |
isDouble() |
boolean |
isFalse() |
boolean |
isFloat() |
boolean |
isInt() |
boolean |
isLong() |
boolean |
isNull() |
boolean |
isNumber() |
boolean |
isStr() |
boolean |
isTrue() |
String |
toString() |
public static final Const TRUE
public static final Const FALSE
public static final Const NULL
public boolean isStr()
public boolean isTrue()
public boolean isFalse()
public boolean isBoolean()
public boolean isNull()
public boolean isInt()
public boolean isLong()
public boolean isFloat()
public boolean isDouble()
public boolean isNumber()
public Object getValue()
public String getStr()
public Boolean getBoolean()
public Integer getInt()
public Long getLong()
public Float getFloat()
public Double getDouble()
public Number getNumber()
Copyright © 2018. All rights reserved.