Package jade.content.abs
Class AbsPredicate
- java.lang.Object
-
- jade.content.abs.AbsObjectImpl
-
- jade.content.abs.AbsPrimitiveSlotsHolder
-
- jade.content.abs.AbsPredicate
-
- All Implemented Interfaces:
AbsContentElement,AbsObject,ContentElement,Predicate,Serializable,Serializable
public class AbsPredicate extends AbsPrimitiveSlotsHolder implements AbsContentElement, Predicate
An abstract descriptor that can hold a predicate expression.- Author:
- Paola Turci, Federico Bergenti - Universita` di Parma
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from interface jade.content.abs.AbsObject
ABS_AGENT_ACTION, ABS_AGGREGATE, ABS_CONCEPT, ABS_CONCEPT_SLOT_FUNCTION, ABS_CONTENT_ELEMENT_LIST, ABS_IRE, ABS_PREDICATE, ABS_PRIMITIVE, ABS_REFERENCE, ABS_VARIABLE, UNKNOWN
-
-
Constructor Summary
Constructors Constructor Description AbsPredicate(String typeName)Construct an Abstract descriptor to hold a predicate of the proper type (e.g.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description AbsObjectgetAbsObject(int index)This method enables all order-based getter methods in AbsPredicateAbsTermgetAbsTerm(String name)Gets the value (casted as an AbsTerm) of an attribute of the predicate held by this abstract descriptor.intgetAbsType()static ClassgetJavaClass()AbsObject[]getValues()This method enables the omonimous method in AbsPredicatebooleanisAContentExpression()Return true if this Abstract Content Element represents a ContentExpression of the SL Grammar (see also FIPA-SL specifications).booleanisMetaFormula()Return true if this object represents a meta formula (symbol ??x) rather than a concrete formula.voidset(String name, AbsObject value)Sets an attribute of the predicate held by this abstract descriptor.voidsetIsAContentExpression(boolean flag)Set the isAContentExpression flag to the passed value.voidsetIsMetaFormula(boolean isMeta)Sets the value of isMetaFormula, where the default is false.-
Methods inherited from class jade.content.abs.AbsPrimitiveSlotsHolder
getBoolean, getByteSequence, getDate, getDouble, getFloat, getInteger, getLong, getString, set, set, set, set, set, set, set, set
-
Methods inherited from class jade.content.abs.AbsObjectImpl
equals, getAbsObject, getCount, getNames, getTypeName, hashCode, isGrounded, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface jade.content.abs.AbsObject
getAbsObject, getCount, getNames, getTypeName, isGrounded
-
-
-
-
Constructor Detail
-
AbsPredicate
public AbsPredicate(String typeName)
Construct an Abstract descriptor to hold a predicate of the proper type (e.g. FATHER_OF, WORKS_FOR...).- Parameters:
typeName- The name of the type of the predicate held by this abstract descriptor.
-
-
Method Detail
-
set
public void set(String name, AbsObject value)
Sets an attribute of the predicate held by this abstract descriptor.- Overrides:
setin classAbsPrimitiveSlotsHolder- Parameters:
name- The name of the attribute to be set.value- The new value of the attribute.
-
getAbsTerm
public AbsTerm getAbsTerm(String name)
Gets the value (casted as an AbsTerm) of an attribute of the predicate held by this abstract descriptor. This method is here mainly for backward compatibility.- Parameters:
name- The name of the attribute.- Returns:
- value The value of the attribute.
-
getAbsObject
public AbsObject getAbsObject(int index)
Description copied from class:AbsObjectImplThis method enables all order-based getter methods in AbsPredicate- Overrides:
getAbsObjectin classAbsObjectImpl
-
getValues
public AbsObject[] getValues()
Description copied from class:AbsObjectImplThis method enables the omonimous method in AbsPredicate- Overrides:
getValuesin classAbsObjectImpl
-
getJavaClass
public static Class getJavaClass()
-
isAContentExpression
public boolean isAContentExpression()
Description copied from interface:AbsContentElementReturn true if this Abstract Content Element represents a ContentExpression of the SL Grammar (see also FIPA-SL specifications).- Specified by:
isAContentExpressionin interfaceAbsContentElement- Returns:
- true if this Abstract Content Element represents a ContentExpression of the SL Grammar (see also FIPA-SL specifications), false otherwise
- See Also:
AbsContentElement.isAContentExpression
-
setIsAContentExpression
public void setIsAContentExpression(boolean flag)
Description copied from interface:AbsContentElementSet the isAContentExpression flag to the passed value. By default, if this method was not called, this value is intialized to false.- Specified by:
setIsAContentExpressionin interfaceAbsContentElement- Parameters:
flag- true if this Abstract Content Element represents a ContentExpression of the SL Grammar (see also FIPA-SL specifications), false otherwise
-
isMetaFormula
public final boolean isMetaFormula()
Return true if this object represents a meta formula (symbol ??x) rather than a concrete formula. This method is currently used only by the semantics framework.- Returns:
- true if this object represents a meta formula
- Since:
- JADE3.4
-
setIsMetaFormula
public final void setIsMetaFormula(boolean isMeta)
Sets the value of isMetaFormula, where the default is false. This method is currently used only by the semantics framework.- Since:
- JADE3.4
-
getAbsType
public int getAbsType()
- Specified by:
getAbsTypein interfaceAbsObject- Overrides:
getAbsTypein classAbsObjectImpl
-
-