|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.iu.cnets.klatsch.lang.Value
public abstract class Value
This is the base class of all values, which are generated by the evaluation of Expression
objects.
Constructor Summary | |
---|---|
Value()
|
Method Summary | |
---|---|
(package private) static void |
require(boolean test)
Takes a test that we need to be true of an argument and ensures that it is. |
static void |
requireCount(Value[] args,
int minCount,
int maxCount)
Requires the given array of arguments to have between minCount and maxCount elements. |
Value |
requireType(java.lang.Class<?>... type)
Requires this value to be a member of one of the given subclasses. |
java.lang.String |
toJson()
Returns a JSON representation of this value. |
abstract java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Value()
Method Detail |
---|
public abstract java.lang.String toString()
toString
in class java.lang.Object
static void require(boolean test) throws EvaluationException
test
- the results of the test
EvaluationException
- if the test failedpublic static void requireCount(Value[] args, int minCount, int maxCount) throws EvaluationException
args
- the array of argumentsminCount
- the minimum number of argumentsmaxCount
- the maximum number of arguments
EvaluationException
- if the count is badpublic Value requireType(java.lang.Class<?>... type) throws EvaluationException
type
- the classes we must be a member of
EvaluationException
- if the types don't matchpublic java.lang.String toJson()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |