public class JRef extends Term
Copyright (C) 1998 Fred Dushin
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Term
Constructor and Description |
---|
JRef(java.lang.Object object)
This constructor creates a JRef, initialized with the supplied (non-null, non-String) Object.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
atomType() |
boolean |
equals(java.lang.Object obj) |
boolean |
hasFunctor(java.lang.String name,
int arity)
Whether this Term's functor has 'name' and 'arity' (c.f.
|
java.lang.Object |
jrefToObject()
Deprecated.
Use org.jpl7.JRef.object()
|
java.lang.Object |
object()
The (non-null, non-String) Object which this org.jpl7.JRef refers to, iff this Term is a JRef.
|
java.lang.Object |
ref()
Deprecated.
|
java.lang.String |
toString()
Returns a Prolog source text representation of this JRef
|
int |
type()
returns the type of this term, as one of org.jpl7.fli.Prolog.COMPOUND, .ATOM, .VARIABLE, .INTEGER, .FLOAT etc
|
java.lang.String |
typeName()
returns the name of the type of this term, as one of "Compound", "Atom", "Variable", "Integer", "Float" or "JRef"
|
arg, args, arity, bigValue, doubleValue, floatValue, hasFunctor, hasFunctor, hasFunctor, intValue, isAtom, isBig, isBigInteger, isCompound, isFloat, isInteger, isJFalse, isJNull, isJRef, isJTrue, isJVoid, isListNil, isListPair, isVariable, listLength, longValue, name, objectToJRef, putParams, putTerm, toString, toTermArray
public JRef(java.lang.Object object)
object
- this JRef's value (a non-null, non-String Object)public final java.lang.String atomType()
public final boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public boolean hasFunctor(java.lang.String name, int arity)
Term
hasFunctor
in class Term
name
- a possible name for the functor of a termarity
- an arity 0+public java.lang.Object jrefToObject()
jrefToObject
in class Term
object()
public java.lang.Object object()
Term
public java.lang.Object ref()
public java.lang.String toString()
toString
in class java.lang.Object
public final int type()
Term
public java.lang.String typeName()
Term