|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.datamanager.tools.EntityList
A container class that is holds a list of Entities. Entities may be added, and removed also.
Constructor Summary | |
EntityList()
Create a new EntityList with the default length. |
|
EntityList(Entity[] list)
Create a new EntityList containing the specified entity array. |
Method Summary | |
void |
add(Entity entity)
Adds the specified entity to the list. |
void |
add(int index,
Entity entity)
Inserts a entity at the specified index. |
void |
addEntities(EntityList entities)
Append the specified list to the list. |
boolean |
contains(Entity entity)
Returns true if the list contains the specified entity. |
Entity |
get(int index)
Retrieves the entity at the specified index. |
void |
remove(Entity entity)
Removes the specified entity from the list. |
Entity |
remove(int index)
Removes the entity at the specified index and returns it. |
void |
removeEntities(EntityList entities)
Removes the specified list from this list. |
int |
size()
The number of entities in the list. |
String |
toString()
Converts the contents to a string representation |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public EntityList()
public EntityList(Entity[] list)
Method Detail |
public Entity get(int index)
index
- the index to retrieve the entity from
public int size()
public boolean contains(Entity entity)
public void add(int index, Entity entity)
entity
- the entity to addindex
- the index to insert the entity atpublic void add(Entity entity)
entity
- the entity to addpublic void addEntities(EntityList entities)
entities
- the EntityList to append to the end of this listpublic Entity remove(int index)
index
- the index to remove the entity at.
public void remove(Entity entity)
entity
- the entity to removepublic void removeEntities(EntityList entities)
entities
- the EntityList to remove from this listpublic String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |