| 
 | GNU Prolog for Java | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectgnu.prolog.term.Term
gnu.prolog.term.CompoundTerm
public class CompoundTerm
Compound terms are the basic method for combining terms. In
 foo(a,b) foo/2 is the compound term while a and
 b are AtomTerms
| Field Summary | |
|---|---|
|  Term[] | argsterm argumets | 
|  CompoundTermTag | tagterm tag | 
| Fields inherited from class gnu.prolog.term.Term | 
|---|
| ATOM, COMPOUND, FLOAT, INTEGER, JAVA_OBJECT, UNKNOWN, VARIABLE | 
| Constructor Summary | |
|---|---|
| CompoundTerm(AtomTerm functor,
             int arity)get term with specified functor and arity | |
| CompoundTerm(AtomTerm functor,
             Term[] args)get term with specified term functor and arguments. | |
| CompoundTerm(CompoundTermTag tag)a contructor | |
| CompoundTerm(CompoundTermTag tg,
             Term arg1)get term with specified term tag and arguments. | |
| CompoundTerm(CompoundTermTag tag,
             Term[] args)a constructor | |
| CompoundTerm(CompoundTermTag tg,
             Term arg1,
             Term arg2)get term with specified term tag and arguments. | |
| CompoundTerm(CompoundTermTag tg,
             Term arg1,
             Term arg2,
             Term arg3)get term with specified term tag and arguments. | |
| CompoundTerm(String functor,
             int arity)get term with specified functor and arity | |
| CompoundTerm(String functor,
             Term[] args)get term with specified term functor and arguments. | |
| Method Summary | |
|---|---|
|  Term | clone(TermCloneContext context)clone the object using clone context | 
| static CompoundTerm | getConjunction(Term head,
               Term tail)get conjunction term | 
| static CompoundTerm | getDisjunction(Term head,
               Term tail)get disjunction term | 
| static Term | getList(List<Term> list)get prolog list by java list | 
| static Term | getList(Term[] list)get prolog list by java array | 
| static CompoundTerm | getList(Term head,
        Term tail)get list pair | 
|  int | getTermType()get type of term | 
| static boolean | isListPair(Term term) | 
| static boolean | toCollection(Term term,
             Collection<Term> col) | 
| Methods inherited from class gnu.prolog.term.Term | 
|---|
| clone, dereference, toString | 
| Methods inherited from class java.lang.Object | 
|---|
| equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| Field Detail | 
|---|
public final CompoundTermTag tag
public final Term[] args
| Constructor Detail | 
|---|
public CompoundTerm(CompoundTermTag tg,
                    Term arg1)
tg - tag of new termarg1 - 1st argument of term
public CompoundTerm(CompoundTermTag tg,
                    Term arg1,
                    Term arg2)
tg - tag of new termarg1 - 1st argument of termarg2 - 2nd argument of term
public CompoundTerm(CompoundTermTag tg,
                    Term arg1,
                    Term arg2,
                    Term arg3)
tg - tag of new termarg1 - 1st argument of termarg2 - 2nd argument of termarg3 - 3rd argument of term
public CompoundTerm(String functor,
                    int arity)
functor - a functor of new termarity - arity of new term
public CompoundTerm(AtomTerm functor,
                    int arity)
functor - a functor of new termarity - arity of new term
public CompoundTerm(AtomTerm functor,
                    Term[] args)
functor - a functor of new termargs - arguments of term, this array is directly assigned to term and any
          changes that are done to array change term.
public CompoundTerm(String functor,
                    Term[] args)
functor - a functor of new termargs - arguments of term, this array is directly assigned to term and any
          changes that are done to array change term.public CompoundTerm(CompoundTermTag tag)
tag - tag of term
public CompoundTerm(CompoundTermTag tag,
                    Term[] args)
tag - tag of termargs - arguments of term| Method Detail | 
|---|
public static boolean isListPair(Term term)
public static CompoundTerm getList(Term head,
                                   Term tail)
head - head termtail - tail term
public static Term getList(Term[] list)
list - 
public static Term getList(List<Term> list)
list - 
public static boolean toCollection(Term term,
                                   Collection<Term> col)
public static CompoundTerm getConjunction(Term head,
                                          Term tail)
head - head termtail - tail term
public static CompoundTerm getDisjunction(Term head,
                                          Term tail)
head - head termtail - tail term
public Term clone(TermCloneContext context)
clone in class Termcontext - clone context
public int getTermType()
getTermType in class Term| 
 | GNU Prolog for Java | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||