public class Struct extends Term
Modifier and Type | Field and Description |
---|---|
static Struct |
EMPTY_LIST |
Constructor and Description |
---|
Struct()
Builds a structure representing an empty list
|
Struct(String f)
Builds a Struct representing an atom
|
Struct(String name_,
int arity_) |
Struct(String f,
Term at0)
Builds a compound, with one argument
|
Struct(String f,
Term[] argList)
Builds a compound, with an array of arguments
|
Struct(String f,
Term at0,
Term at1)
Builds a compound, with two arguments
|
Struct(String f,
Term at0,
Term at1,
Term at2)
Builds a compound, with three arguments
|
Struct(String f,
Term at0,
Term at1,
Term at2,
Term at3)
Builds a compound, with four arguments
|
Struct(String f,
Term at0,
Term at1,
Term at2,
Term at3,
Term at4)
Builds a compound, with five arguments
|
Struct(String f,
Term at0,
Term at1,
Term at2,
Term at3,
Term at4,
Term at5)
Builds a compound, with six arguments
|
Struct(String f,
Term at0,
Term at1,
Term at2,
Term at3,
Term at4,
Term at5,
Term at6)
Builds a compound, with seven arguments
|
Struct(Term[] argList)
Builds a list specifying the elements
|
Struct(Term h,
Term t)
Builds a list providing head and tail
|
Modifier and Type | Method and Description |
---|---|
void |
append(Term t)
Appends an element to this structure supposed to be a list
|
Term |
copy(AbstractMap vMap,
AbstractMap substMap)
Gets a copy of this structure
|
Term |
copy(AbstractMap vMap,
int idExecCtx)
Gets a copy of this structure
|
void |
free()
dummy method
|
Term |
getArg(int index)
Gets the i-th element of this structure
No bound check is done
|
Struct |
getArg(String name)
Gets an argument inside this structure, given its name
|
int |
getArity()
Gets the number of elements of
this structure
|
String |
getName()
Gets the functor name of this structure
|
String |
getPredicateIndicator() |
PrimitiveInfo |
getPrimitive()
Get primitive behaviour associated at structure
|
Term |
getTerm()
Gets the actual term referred by this Term.
|
Term |
getTerm(int index)
Gets the i-th element of this structure
No bound check is done.
|
boolean |
isAtom()
is this term a prolog (alphanumeric) atom?
|
boolean |
isAtomic()
is this term a constant prolog term?
|
boolean |
isClause()
Check is this struct is clause or directive
|
boolean |
isCompound()
is this term a prolog compound term?
|
boolean |
isEmptyList()
Is this structure an empty list?
|
boolean |
isEqual(Prolog mediator,
Term t)
Test if a term is equal to other
|
boolean |
isGreater(Prolog mediator,
Term t)
Test if a term is greater than other
|
boolean |
isGround()
is this term a ground term?
|
boolean |
isList()
is this term a prolog list?
|
boolean |
isNumber()
is this term a prolog numeric term?
|
boolean |
isPrimitive()
Check if this term is a primitive struct
|
boolean |
isStruct()
is this term a struct
|
boolean |
isVar()
is this term a variable
|
Term |
iteratedGoalTerm()
The iterated-goal term G of a term T is a term defined
recursively as follows:
if T unifies with ^(_, Goal) then G is the iterated-goal
term of Goal
else G is T
|
Term |
listHead()
Gets the head of this structure, which is supposed to be a list.
|
Iterator |
listIterator()
Gets an iterator on the elements of this structure, which is supposed to be a list.
|
int |
listSize()
Gets the number of elements of this structure, which is supposed to be a list.
|
Struct |
listTail()
Gets the tail of this structure, which is supposed to be a list.
|
long |
resolveTerm(long count)
resolve term
|
String |
toString()
Gets the string representation of this structure
Specific representations are provided for lists and atoms.
|
boolean |
unify(Prolog mediator,
List vl1,
List vl2,
Term t)
Try to unify two terms
|
copyGoal, copyResult, createTerm, createTerm, equals, getIterator, match, parse, parse, resolveTerm, unify
public static final Struct EMPTY_LIST
public Struct(String f)
public Struct(String f, Term at0, Term at1, Term at2)
public Struct(String f, Term at0, Term at1, Term at2, Term at3)
public Struct(String f, Term at0, Term at1, Term at2, Term at3, Term at4)
public Struct(String f, Term at0, Term at1, Term at2, Term at3, Term at4, Term at5)
public Struct(String f, Term at0, Term at1, Term at2, Term at3, Term at4, Term at5, Term at6)
public Struct()
public Struct(Term[] argList)
public Struct(String name_, int arity_)
public String getPredicateIndicator()
public int getArity()
public String getName()
public Term getArg(int index)
public Term getTerm(int index)
getArg(index).getTerm()
public boolean isNumber()
public boolean isAtomic()
Term
public boolean isCompound()
Term
isCompound
in class Term
public boolean isAtom()
Term
public boolean isList()
Term
public boolean isGround()
Term
public boolean isClause()
public Term getTerm()
Term
public Struct getArg(String name)
name
- name of the structurepublic Term copy(AbstractMap vMap, int idExecCtx)
public Term copy(AbstractMap vMap, AbstractMap substMap)
public long resolveTerm(long count)
resolveTerm
in class Term
count
- new starting time count for resolving processpublic boolean isEmptyList()
isEmptyList
in class Term
public Term listHead()
Gets the head of this structure, which is supposed to be a list.
If the callee structure is not a list, throws an UnsupportedOperationException
public Struct listTail()
Gets the tail of this structure, which is supposed to be a list.
If the callee structure is not a list, throws an UnsupportedOperationException
public int listSize()
Gets the number of elements of this structure, which is supposed to be a list.
If the callee structure is not a list, throws an UnsupportedOperationException
public Iterator listIterator()
Gets an iterator on the elements of this structure, which is supposed to be a list.
If the callee structure is not a list, throws an UnsupportedOperationException
public void append(Term t)
public PrimitiveInfo getPrimitive()
public boolean isPrimitive()
public String toString()
public Term iteratedGoalTerm()
Term
iteratedGoalTerm
in class Term
Copyright © 2015. All rights reserved.