|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.xj.anylogic.engine.ActiveObjectCollection<E>
com.xj.anylogic.engine.ActiveObjectList<E>
com.xj.anylogic.engine.ActiveObjectArrayList<E>
E - Active Object typepublic class ActiveObjectArrayList<E extends ActiveObject>
Replicated active object list based on array implementation
Supports fast element retrieval by its index (the get(int) operation
runs in constant time).
The add operation runs in amortized constant time, that is, adding n elements
requires O(n) time.
| Constructor Summary | |
|---|---|
ActiveObjectArrayList()
Constructs an empty list with an initial capacity of ten. |
|
| Method Summary | |
|---|---|
void |
_add(E activeObject)
This method should not be called by user Call add_EONAME() method of class containing embedded object
with name EONAME |
boolean |
_remove(E activeObject)
This method should not be called by user Call remove_EONAME() method of class containing embedded object
with name EONAME |
boolean |
contains(java.lang.Object activeObject)
Returns true if this replicated active object contains the specified element. |
E |
get(int index)
Returns the active object element at the specified position in this replicated active object. |
boolean |
isEmpty()
Returns true if this replicated active object contains no elements. |
java.util.Iterator<E> |
iterator()
Returns an iterator over the replicated active object. |
E |
random()
Randomly returns one active object from this collection (uses uniform distribution from the Engine) This method runs in constant time |
int |
size()
Returns the number of elements in this replicated active object. |
java.lang.String |
toString()
|
| Methods inherited from class com.xj.anylogic.engine.ActiveObjectCollection |
|---|
average, average, count, max, max, min, min, restoreOwner, sum, sum |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ActiveObjectArrayList()
| Method Detail |
|---|
public void _add(E activeObject)
ActiveObjectCollectionadd_EONAME() method of class containing embedded object
with name EONAME
_add in class ActiveObjectCollection<E extends ActiveObject>public boolean _remove(E activeObject)
ActiveObjectCollectionremove_EONAME() method of class containing embedded object
with name EONAME
_remove in class ActiveObjectCollection<E extends ActiveObject>public E get(int index)
ActiveObjectList
get in class ActiveObjectList<E extends ActiveObject>index - index of the element to return
public boolean contains(java.lang.Object activeObject)
ActiveObjectCollection
contains in class ActiveObjectCollection<E extends ActiveObject>activeObject - element whose presence in this replicated active object is to
be tested
public boolean isEmpty()
ActiveObjectCollection
isEmpty in class ActiveObjectCollection<E extends ActiveObject>public java.util.Iterator<E> iterator()
ActiveObjectList
iterator in interface java.lang.Iterable<E extends ActiveObject>iterator in class ActiveObjectList<E extends ActiveObject>public int size()
ActiveObjectCollection
size in class ActiveObjectCollection<E extends ActiveObject>public E random()
random in class ActiveObjectCollection<E extends ActiveObject>public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||