jade.content.abs
Class AbsIRE

java.lang.Object
  |
  +--jade.content.abs.AbsObjectImpl
        |
        +--jade.content.abs.AbsIRE
All Implemented Interfaces:
AbsContentElement, AbsObject, AbsTerm, ContentElement, java.io.Serializable, Serializable, Term

public class AbsIRE
extends jade.content.abs.AbsObjectImpl
implements AbsContentElement, AbsTerm

An Abstract descriptor that can hold an Identifying Referential Expression (IRE). Note that an IRE is both a content element (as in the case of a QUERY-REF communicative act) and a Term (as in the case of (== (X) (iota ?x P(?x))

Author:
Paola Turci, Federico Bergenti - Universita` di Parma
See Also:
Serialized Form

Constructor Summary
AbsIRE(java.lang.String typeName)
          Construct an Abstract descriptor to hold a IRE of the proper type (e.g.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Returns true if the attribute is equal to this abstract descriptor, based on the contents of both descriptors.
 AbsObject getAbsObject(java.lang.String name)
          Gets the value of an attribute of the object held by this abstract descriptor.
 int getCount()
          Gets the number of attributes.
static java.lang.Class getJavaClass()
           
 java.lang.String[] getNames()
           
 AbsPredicate getProposition()
          Gets the proposition of this IRE.
 java.lang.String getTypeName()
           
 AbsVariable getVariable()
          Gets the variable of this IRE.
 int hashCode()
          Returns an integer hashcode calculated from the contents of this abstract descriptor
 boolean isGrounded()
          Redefine the isGrounded() method in order to always return false.
protected  void set(java.lang.String name, AbsObject value)
          Sets an attribute of the object held by this abstract descriptor.
 void setProposition(AbsPredicate proposition)
          Sets the proposition of this IRE.
 void setVariable(AbsVariable variable)
          Sets the variable of this IRE.
 java.lang.String 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
 

Constructor Detail

AbsIRE

public AbsIRE(java.lang.String typeName)
Construct an Abstract descriptor to hold a IRE of the proper type (e.g. ANY, IOTA, ALL...).

Parameters:
typeName - The name of the type of the IRE held by this abstract descriptor.
Method Detail

setVariable

public void setVariable(AbsVariable variable)
Sets the variable of this IRE.

Parameters:
variable - The abstract descriptor holding the variable.

setProposition

public void setProposition(AbsPredicate proposition)
Sets the proposition of this IRE.

Parameters:
proposition - The abstract descriptor holding the proposition.

getVariable

public AbsVariable getVariable()
Gets the variable of this IRE.

Returns:
the abstract descriptor holding the variable of this IRE.

getProposition

public AbsPredicate getProposition()
Gets the proposition of this IRE.

Returns:
the abstract descriptor holding the proposition of this IRE.

isGrounded

public boolean isGrounded()
Redefine the isGrounded() method in order to always return false. Infact an IRE always includes a variable.

Specified by:
isGrounded in interface AbsObject
Overrides:
isGrounded in class jade.content.abs.AbsObjectImpl
Returns:
true if the object is grounded.

getJavaClass

public static java.lang.Class getJavaClass()

getTypeName

public java.lang.String getTypeName()
Specified by:
getTypeName in interface AbsObject
Returns:
The name of the type of the object held by this abstract descriptor.
See Also:
AbsObject.getTypeName()

set

protected void set(java.lang.String name,
                   AbsObject value)
Sets an attribute of the object held by this abstract descriptor.

Parameters:
name - The name of the attribute to be set.
value - The new value of the attribute. If value is null the current mapping with name (if any) is removed.

getAbsObject

public AbsObject getAbsObject(java.lang.String name)
Gets the value of an attribute of the object held by this abstract descriptor.

Specified by:
getAbsObject in interface AbsObject
Parameters:
name - The name of the attribute.
Returns:
value The value of the attribute.
See Also:
AbsObject.getAbsObject(String)

getNames

public java.lang.String[] getNames()
Specified by:
getNames in interface AbsObject
Returns:
the name of all attributes.
See Also:
AbsObject.getNames()

getCount

public int getCount()
Gets the number of attributes.

Specified by:
getCount in interface AbsObject
Returns:
the number of attributes.
See Also:
AbsObject.getCount()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Returns true if the attribute is equal to this abstract descriptor, based on the contents of both descriptors.

Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Returns an integer hashcode calculated from the contents of this abstract descriptor

Overrides:
hashCode in class java.lang.Object


JADE