|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorc.runtime.values.Value
orc.runtime.values.Constant
public class Constant
A value container for an arbitrary Java object, which includes Orc literal atomic values.
This has overrides to support treating collections and arrays as lists (i.e. list pattern matches will work on them).
FIXME: how well does this cope with Java nulls?
Constructor Summary | |
---|---|
Constant(java.lang.Object value)
|
Method Summary | ||
---|---|---|
|
accept(Visitor<E> visitor)
|
|
Callable |
forceCall(Token t)
A Java value used in call position becomes a proxied object. |
|
java.lang.Object |
getValue()
|
|
Value |
head()
Return the head value of a cons-like data structure. |
|
boolean |
isCons()
|
|
boolean |
isNil()
|
|
Value |
tail()
Return the tail value of a cons-like data structure. |
|
java.lang.String |
toString()
|
Methods inherited from class orc.runtime.values.Value |
---|
forceArg, isNone, isSome, signal, untag |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Constant(java.lang.Object value)
Method Detail |
---|
public java.lang.Object getValue()
public java.lang.String toString()
toString
in class java.lang.Object
public Callable forceCall(Token t)
forceCall
in interface Future
forceCall
in class Value
public Value head()
Value
head
in class Value
public Value tail()
Value
tail
in class Value
public boolean isCons()
isCons
in class Value
public boolean isNil()
isNil
in class Value
public <E> E accept(Visitor<E> visitor)
accept
in class Value
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |