| |
|
| java.lang.Object com.caucho.es.ESBase com.caucho.es.ESNumber
ESNumber | public class ESNumber extends ESBase implements VfsWriteObject,Externalizable(Code) | | Implementation class for JavaScript numbers. Essentially, these are
equivalent to Java doubles.
|
Constructor Summary | |
public | ESNumber() Null-arg constructor for serialization. |
ESNumber | public ESNumber()(Code) | | Null-arg constructor for serialization.
|
hashCode | public int hashCode()(Code) | | |
isNum | public boolean isNum()(Code) | | |
toBoolean | public boolean toBoolean()(Code) | | Any non-zero number is true.
XXX: NaN and inf?
|
toNum | public double toNum()(Code) | | |
toString | public String toString()(Code) | | Returns the string representation of the number.
Notes: the spec says
1) -0 should be printed at 0.
2) 20 decimal digit integers should be printed as integers.
This is insane since the double can only almost a 16 digit decimal.
3) The exponent should be lower case.
|
Methods inherited from com.caucho.es.ESBase | public ESBase call(Call eval, int length) throws Throwable(Code)(Java Doc) public ESBase call(Call eval, int length, ESString key) throws Throwable(Code)(Java Doc) boolean canPut(ESString name)(Code)(Java Doc) public ESBase construct(Call eval, int length) throws Throwable(Code)(Java Doc) Object copy(HashMap refs)(Code)(Java Doc) public ESBase delete(ESString key) throws Throwable(Code)(Java Doc) ESBase delete(String key) throws Throwable(Code)(Java Doc) ESBase delete(int i) throws Throwable(Code)(Java Doc) public boolean ecmaEquals(ESBase b) throws Throwable(Code)(Java Doc) String getClassName()(Code)(Java Doc) public Class getJavaType()(Code)(Java Doc) public ESBase getProperty(ESString key) throws Throwable(Code)(Java Doc) public ESBase getProperty(String key) throws Throwable(Code)(Java Doc) ESBase getProperty(int i) throws Throwable(Code)(Java Doc) public boolean greaterThan(ESBase ob, boolean neg) throws Throwable(Code)(Java Doc) public ESBase hasProperty(ESString key) throws Throwable(Code)(Java Doc) ESBase hasProperty(int i) throws Throwable(Code)(Java Doc) static void init(ESFactory factory)(Code)(Java Doc) public boolean isBoolean()(Code)(Java Doc) public boolean isNum()(Code)(Java Doc) public boolean isString()(Code)(Java Doc) public Iterator keys() throws Throwable(Code)(Java Doc) public boolean lessThan(ESBase ob, boolean neg) throws Throwable(Code)(Java Doc) public ESBase plus(ESBase b) throws Throwable(Code)(Java Doc) public void setProperty(ESString key, ESBase value) throws Throwable(Code)(Java Doc) public void setProperty(String key, ESBase value) throws Throwable(Code)(Java Doc) public void setProperty(int i, ESBase value) throws Throwable(Code)(Java Doc) public boolean toBoolean()(Code)(Java Doc) public int toInt32() throws Throwable(Code)(Java Doc) public Object toJavaObject() throws ESException(Code)(Java Doc) public String toJavaString() throws Throwable(Code)(Java Doc) public double toNum() throws Throwable(Code)(Java Doc) public ESObject toObject() throws ESException(Code)(Java Doc) public ESBase toPrimitive(int type) throws Throwable(Code)(Java Doc) public ESBase toPrimitive() throws Throwable(Code)(Java Doc) public ESString toSource(IntMap map, boolean isLoopPass) throws Throwable(Code)(Java Doc) public ESString toStr() throws Throwable(Code)(Java Doc) public String toString()(Code)(Java Doc) public ESBase typeof() throws ESException(Code)(Java Doc) public ESBase valueOf() throws Throwable(Code)(Java Doc)
|
|
|
|