public interface PrologStructure extends PrologTerm
Represent structured prolog compound term. Prolog structures consist in a relation the functor (structure name) and arguments enclosed between parenthesis.
The Prolog Provider is the mechanism to create a new Prolog structures
invoking PrologProvider.newStructure(String, PrologTerm...)
.
Two structures are equals if and only if are structure and have equals functor and arguments. Structures terms unify only with same functor and arguments structures, with free variable or with with structures where your arguments unify if they have the same functor and arity.
Structures have a special property named arity that means the number of arguments present in the structure.
There are two special structures term. They are expressions (Two arguments
structure term with operator functor) and atoms (functor with zero
arguments). For the first special case must be used
PrologProvider.newStructure(PrologTerm, String, PrologTerm)
specifying operands like arguments and operator like functor. For the second
special case must be used PrologProvider.newAtom(String)
specifying
functor only.
Modifier and Type | Method and Description |
---|---|
PrologTerm |
getLeft()
Return the left operand of the current term if the current term is an
evalueble structure (expression).
|
String |
getOperator()
Return the operator (structure functor) of the current term if the current
term is an evalueble structure (expression).
|
PrologTerm |
getRight()
Return the right operand of the current term if the current term is an
evalueble structure (expression).
|
cast, getArgument, getArguments, getArity, getFunctor, getIndicator, getObject, getProvider, getTerm, getType, hasIndicator, isAtom, isAtomic, isClass, isCompound, isDouble, isEmptyList, isEntry, isEvaluable, isFalseType, isField, isFloat, isInteger, isList, isLong, isMap, isMixin, isNil, isNullType, isNumber, isObjectType, isParameter, isReference, isResult, isStructure, isTrueType, isVariable, isVariableBound, isVariableNotBound, isVoidType, match, unify
compareTo
isClause, isTerm
String getOperator()
PrologTerm.getFunctor()
PrologTerm getLeft()
PrologTerm.getArgument(int)
with integer parameter equals to zero.PrologTerm getRight()
PrologTerm.getArgument(int)
with integer parameter equals to one.Copyright © 2020–2024 Prolobjectlink Project. All rights reserved.