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
Modifier and Type | Field and Description |
---|---|
protected java.lang.Object |
object
the JRef's value (a non-null, non-String Object)
|
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 o) |
boolean |
hasFunctor(java.lang.String name,
int arity)
Whether this Term's functor has 'name' and 'arity' (c.f.
|
int |
hashCode() |
java.lang.Object |
object()
Returns the actual object the JREF stands for
|
protected void |
put(java.util.Map<java.lang.String,term_t> varnames_to_vars,
term_t term)
To convert a JRef to a term, we put its Object field (.ref) into the term_t as a <jref>(0x01DF800) blob.
|
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, atomListToStringArray, bigValue, doubleValue, floatValue, getSubst, getSubsts, getTerm, getTerm, hasFunctor, hasFunctor, hasFunctor, intArrayArrayToList, intArrayToList, intValue, isAtom, isAtomOfNameType, isBig, isBigInteger, isCompound, isFloat, isInteger, isJFalse, isJNull, isJRef, isJTrue, isJVoid, isList, isList, isListNil, isListPair, isVariable, jrefToObject, listLength, listLength, listToTermArray, listToTermArray, longValue, name, objectToJRef, put, putParams, putParams, putParams1, putParams2, putTerm, putTerms, setName, stringArrayToList, termArrayToList, textParamsToTerm, textToTerm, toString, toTermArray
protected final java.lang.Object object
public JRef(java.lang.Object object)
object
- this JRef's value (a non-null, non-String Object)public final java.lang.String atomType()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
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 object()
protected final void put(java.util.Map<java.lang.String,term_t> varnames_to_vars, term_t term)
@Deprecated public java.lang.Object ref()
object()
Term
public java.lang.String toString()
toString
in class java.lang.Object
public final int type()
Term
public java.lang.String typeName()
Term