public class AbsContentElementList extends java.lang.Object implements AbsContentElement
ABS_AGENT_ACTION, ABS_AGGREGATE, ABS_CONCEPT, ABS_CONCEPT_SLOT_FUNCTION, ABS_CONTENT_ELEMENT_LIST, ABS_IRE, ABS_PREDICATE, ABS_PRIMITIVE, ABS_VARIABLE, UNKNOWN| Constructor and Description |
|---|
AbsContentElementList()
Construct an Abstract descriptor to hold a content element list
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(AbsContentElement element)
Add a new element (that must be a content element) to this
content element list.
|
void |
clear()
Clear all the elements in this content element list.
|
boolean |
contains(AbsContentElement element)
Test if a given content element is contained in this
content element list.
|
AbsContentElement |
get(int i)
Retrieves the
i-th element in this content element list. |
AbsObject |
getAbsObject(java.lang.String name)
Makes no sense in the case of an AbsContentElementList that has no attribute
--> Just return null
|
int |
getAbsType() |
int |
getCount()
Return the number of elements in the list.
|
java.lang.String[] |
getNames()
Makes no sense in the case of an AbsContentElementList that has no attribute
--> Just return null
|
java.lang.String |
getTypeName() |
int |
hashCode() |
int |
indexOf(AbsContentElement element)
Returns the position of an element within this content element list.
|
boolean |
isAContentExpression()
Return true if this Abstract Content Element represents a ContentExpression
of the SL Grammar (see also FIPA-SL specifications).
|
boolean |
isEmpty()
Test if the content element list is empty.
|
boolean |
isGrounded()
Tests if this AbsContentElementList is grounded, i.e., if no one of its elements
is associated with a variable
|
Iterator |
iterator() |
AbsContentElement |
remove(int index)
Removes the element at the given position from this content
element list.
|
void |
setIsAContentExpression(boolean flag)
Set the isAContentExpression flag to the passed value.
|
int |
size()
Retrieves the number of elements in this content element list.
|
AbsContentElement[] |
toArray()
Retrieve all elements in this content element list in the form of
an array.
|
java.lang.String |
toString()
This method is here just for debugging.
|
public AbsContentElementList()
public void add(AbsContentElement element)
element - The element to add.public int size()
public AbsContentElement get(int i)
i-th element in this content element list.i - The index of the element to retrieve.public Iterator iterator()
Iterator over the elements of this
content element list.public void clear()
public boolean contains(AbsContentElement element)
true if the given content element is contained
in this content element list.public int indexOf(AbsContentElement element)
public AbsContentElement remove(int index)
public boolean isEmpty()
true if this content element list does
not contain any element.public AbsContentElement[] toArray()
public java.lang.String getTypeName()
getTypeName in interface AbsObjectAbsObject.getTypeName()public AbsObject getAbsObject(java.lang.String name)
getAbsObject in interface AbsObjectname - The name of the attribute.public java.lang.String[] getNames()
public boolean isGrounded()
isGrounded in interface AbsObjecttrue if the object is grounded.public int getCount()
size()public java.lang.String toString()
toString in class java.lang.ObjectStringCodec.encode(AbsContentElement content)public int hashCode()
hashCode in class java.lang.Objectpublic boolean isAContentExpression()
AbsContentElementisAContentExpression in interface AbsContentElementAbsContent.isAContentExpressionpublic void setIsAContentExpression(boolean flag)
AbsContentElementsetIsAContentExpression in interface AbsContentElementflag - true if this Abstract Content Element represents a ContentExpression
of the SL Grammar (see also FIPA-SL specifications), false otherwiseAbsContent.setIsAContentExpression(boolean flag)public int getAbsType()
getAbsType in interface AbsObject