|
|||||||||
| 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) 2006 Sandia National Laboratories
| 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 invalid| Method Detail |
|---|
public final long longValue(Context c)
Value
longValue in class Valuec - the execution context used to resolve the value
public final double numericValue(Context c)
Value
numericValue in class Valuec - the execution context used to resolve the value
public final int intValue(Context c)
Value
intValue in class Valuec - the execution context used to resolve the value
public java.lang.Object javaObjectValue(Context c)
throws JessException
Value
javaObjectValue in class Valuec - 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 Valuec - the execution context used to resolve the value
public final java.lang.String toString()
Value
toString in class Valuepublic final boolean equals(Value v)
Value
equals in class Valuev - the Value to compare to.
public final boolean equals(java.lang.Object v)
Value
equals in class Valuev - the object to compare to.
public final boolean equalsStar(Value v)
Value
equalsStar in class Valuev - Value to compare to
public int hashCode()
Value
hashCode in class Value
public boolean isNumeric(Context c)
throws JessException
Value
isNumeric in class Valuec - the execution context used to resolve the value
JessException - if something goes wrong during value resolution
public boolean isLexeme(Context c)
throws JessException
Value
isLexeme in class Valuec - the execution context used to resolve the value
JessException - if something goes wrong during value resolutionpublic boolean isLiteral()
Value
isLiteral in class Value
|
© 2008 Sandia Corporation | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||