|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.molwind.model.BaseWorldEntity
public class BaseWorldEntity
BaseWorldEntity provides a basic implementation of a world entity.
Field Summary | |
---|---|
protected java.util.ArrayList |
relationships
|
Constructor Summary | |
---|---|
protected |
BaseWorldEntity()
|
Method Summary | |
---|---|
void |
addRelationship(Relationship relation)
Adds a relationship object to this entity. |
boolean |
existRelationship(Relationship relation)
Tests whether the given relationship already exists. |
java.lang.Object |
getAttribute(java.lang.String name)
Returns the value of the attribute with the given name. |
int |
getDimension()
Returns 0 for this kind of entity |
Relationship[] |
getRelationship(Relationship relation)
Searches the relationships for the given relationship. |
java.util.Iterator |
getRelationships()
Returns an iterator of relationship objects. |
void |
putAttribute(java.lang.String name,
java.lang.Object value)
Sets the value of the attribute with the given name. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.ArrayList relationships
Constructor Detail |
---|
protected BaseWorldEntity()
Method Detail |
---|
public void putAttribute(java.lang.String name, java.lang.Object value)
putAttribute
in interface WorldEntity
name
- the name of the attributevalue
- the value of the attributepublic java.lang.Object getAttribute(java.lang.String name)
getAttribute
in interface WorldEntity
name
- the name of the attribute
public java.util.Iterator getRelationships()
getRelationships
in interface WorldEntity
public boolean existRelationship(Relationship relation)
relation
- the relationship to be tested
public void addRelationship(Relationship relation)
relation
- the relationship to be addedpublic Relationship[] getRelationship(Relationship relation)
relation
- the query relationship
public int getDimension()
getDimension
in interface WorldEntity
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |