|
||||||||||
| 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.ActiveObjectLinkedHashSet<E>
public class ActiveObjectLinkedHashSet<E extends ActiveObject>
Replicated active object collection based on LinkedHashSet implementation
This collection offers constant time performance for the basic operations (add,
remove, contains and size) and guarantees insertion-order during iteration
Note, that due to set-based implementation, element retrieval by its index
(get(int)) is extremely slow when rapidly invoked it with random
index for large collections. In a similar manner, ActiveObject.getIndex()
method of active objects in this collection will be slow too.
| Constructor Summary | |
|---|---|
ActiveObjectLinkedHashSet()
|
|
| 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. |
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, random, restoreOwner, sum, sum |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ActiveObjectLinkedHashSet()
| Method Detail |
|---|
public boolean contains(java.lang.Object activeObject)
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()
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 get(int index)
get in class ActiveObjectList<E extends ActiveObject>index - index of the element to return
java.lang.IndexOutOfBoundsException - if the index is out of range (index < 0 || index >= size())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 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 | |||||||||