|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object orc.runtime.values.Value orc.runtime.sites.Site orc.runtime.sites.EvalSite orc.runtime.sites.core.Equal
public class Equal
Implement standard equality.
Field Summary |
---|
Fields inherited from class orc.runtime.values.Value |
---|
futureNotReady |
Constructor Summary | |
---|---|
Equal()
|
Method Summary | |
---|---|
static boolean |
eq(java.lang.Object a,
java.lang.Object b)
Are two values equivalent, in the sense that one may be substituted for another without changing the meaning of the program? |
java.lang.Object |
evaluate(Args args)
|
static void |
registerValueClass(java.lang.Class c)
Register a class as a "value class" which can be safely compared with Object.equals(Object) . |
Type |
type()
|
Methods inherited from class orc.runtime.sites.EvalSite |
---|
callSite |
Methods inherited from class orc.runtime.sites.Site |
---|
accept, createCall |
Methods inherited from class orc.runtime.values.Value |
---|
forceArg, forceCall, signal, write |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Equal()
Method Detail |
---|
public static void registerValueClass(java.lang.Class c)
Object.equals(Object)
. Instances of value classes should be immutable.
If possible, it's better if you make your class implement the interface
Eq
instead. This is here as a workaround for third-party
libraries which can't be modified.
You should call this from a static constructor, so you can be reasonably
sure everything is registered before eq(Object, Object)
is
called.
c
- public java.lang.Object evaluate(Args args) throws TokenException
evaluate
in class EvalSite
TokenException
public static boolean eq(java.lang.Object a, java.lang.Object b)
Eq
public Type type()
type
in class Site
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |