|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjess.Value
jess.LongValue
public class LongValue
A LongValue represents a Java long in Jess. You can do arithmetic and perform various other operations on LongValues. Use this subclass of Value when you want to create a Value that represents a Java long.
(C) 2013 Sandia Corporation
Constructor Summary | |
---|---|
LongValue(long l)
Create a LongValue |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object v)
Compare this value to another object. |
boolean |
equals(Value v)
Compare this value to another value. |
boolean |
equalsStar(Value v)
Like equals(Value), but returns true for 3 == 3.0 |
int |
hashCode()
Return a hashcode for the object. |
int |
intValue(Context c)
Returns the contents of this value, as an int. |
boolean |
isLexeme(Context c)
Indicate whether this object represents a lexeme. |
boolean |
isLiteral()
Indicate whether this value represents a literal. |
boolean |
isNumeric(Context c)
Indicate whether this object represents a number. |
java.lang.Object |
javaObjectValue(Context c)
Returns the contents of this value, as a Java object. |
long |
longValue(Context c)
Returns the contents of this value, as a long. |
double |
numericValue(Context c)
Returns the contents of this value, as a number. |
java.lang.String |
stringValue(Context c)
Returns the contents of this value, as a String. |
java.lang.String |
toString()
Return a pretty-print version of this value, without adding parens to any lists. |
Methods inherited from class jess.Value |
---|
atomValue, externalAddressValue, factValue, floatValue, funcallValue, functionValue, isVariable, listValue, resolveValue, symbolValue, toStringWithParens, type, variableValue |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public LongValue(long l) throws JessException
l
- The long value
JessException
- If the type is invalidMethod Detail |
---|
public final long longValue(Context c)
Value
longValue
in class Value
c
- the execution context used to resolve the value
public final double numericValue(Context c)
Value
numericValue
in class Value
c
- the execution context used to resolve the value
public final int intValue(Context c)
Value
intValue
in class Value
c
- the execution context used to resolve the value
public java.lang.Object javaObjectValue(Context c) throws JessException
Value
javaObjectValue
in class Value
c
- the execution context used to resolve the value
JessException
- if this value does not contain a Java objectpublic final java.lang.String stringValue(Context c)
Value
stringValue
in class Value
c
- the execution context used to resolve the value
public final java.lang.String toString()
Value
toString
in class Value
public final boolean equals(Value v)
Value
equals
in class Value
v
- the Value to compare to.
public final boolean equals(java.lang.Object v)
Value
equals
in class Value
v
- the object to compare to.
public final boolean equalsStar(Value v)
Value
equalsStar
in class Value
v
- Value to compare to
public int hashCode()
Value
hashCode
in class Value
public boolean isNumeric(Context c) throws JessException
Value
isNumeric
in class Value
c
- the execution context used to resolve the value
JessException
- if something goes wrong during value resolutionpublic boolean isLexeme(Context c) throws JessException
Value
isLexeme
in class Value
c
- the execution context used to resolve the value
JessException
- if something goes wrong during value resolutionpublic boolean isLiteral()
Value
isLiteral
in class Value
|
© 2013 Sandia Corporation | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |