Class CompoundTermImpl
java.lang.Object
com.parctechnologies.eclipse.AbstractCompoundTerm
com.parctechnologies.eclipse.CompoundTermImpl
- All Implemented Interfaces:
CompoundTerm
An ECLiPSe compound term. This concrete class can be used to construct objects
which implement the CompoundTerm interface.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCompoundTermImpl(Object[] term) Construct a compound term from an Object array.CompoundTermImpl(String functor, Object a1) Convenience constructor for compound terms with arity 1.CompoundTermImpl(String functor, Object[] args) Construct a compound term from a String and an Object array.CompoundTermImpl(String functor, Object a1, Object a2) Convenience constructor for terms with arity 2.CompoundTermImpl(String functor, Object a1, Object a2, Object a3) Convenience constructor for compound terms with arity 3.Convenience constructor for compound terms with arity 4.Convenience constructor for compound terms with arity 5. -
Method Summary
Methods inherited from class AbstractCompoundTerm
arity, equals, functor, hashCode
-
Constructor Details
-
CompoundTermImpl
Construct a compound term from an Object array. In this constructor the functor (which should be a String) is passed in as element 0 of the array parameter, the other arguments, which can be instances of any Java classes/interfaces representing ECLiPSe types, are the remaining elements of the array. The arity is therefore the size of the array - 1. -
CompoundTermImpl
-
CompoundTermImpl
-
CompoundTermImpl
-
CompoundTermImpl
-
CompoundTermImpl
-
CompoundTermImpl
-
-
Method Details
-
arg
Return one of the term's arguments. These may be instances of any Java class/interface representing an ECLiPSe type.- Specified by:
argin interfaceCompoundTerm- Parameters:
i- the argument index. This may vary between 1 andarity()inclusive.
-
argCT
Return the argument at positioni, as a CompoundTermImpl. This operation is the same as arg, except that it tries to cast the result to a CompoundTermImpl. Useful for extracting nested objects: eg.a = result.argCT(1).argCT(3).argCT(3);- Parameters:
i- may vary between 1 andarity()
-
toString
-