com.xj.anylogic.engine
Class ActiveObjectList<E extends ActiveObject>

java.lang.Object
  extended by com.xj.anylogic.engine.ActiveObjectCollection<E>
      extended by com.xj.anylogic.engine.ActiveObjectList<E>
Type Parameters:
E - Active Object type
All Implemented Interfaces:
com.xj.anylogic.engine.internal.Child, java.io.Serializable, java.lang.Iterable<E>
Direct Known Subclasses:
ActiveObjectArrayList, ActiveObjectLinkedHashSet

public abstract class ActiveObjectList<E extends ActiveObject>
extends ActiveObjectCollection<E>

Replicated active object list interface

Author:
XJ Technologies Company Ltd. www.anylogic.com
See Also:
ActiveObjectArrayList, Serialized Form

Constructor Summary
ActiveObjectList()
           
 
Method Summary
abstract  E get(int index)
          Returns the active object element at the specified position in this replicated active object.
abstract  java.util.Iterator<E> iterator()
          Returns an iterator over the replicated active object.
 
Methods inherited from class com.xj.anylogic.engine.ActiveObjectCollection
_add, _remove, average, average, contains, count, isEmpty, max, max, min, min, random, restoreOwner, size, sum, sum
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ActiveObjectList

public ActiveObjectList()
Method Detail

iterator

public abstract java.util.Iterator<E> iterator()
Returns an iterator over the replicated active object.
This iterator guarantees the insertion order of elements (i.e. the order in which active object were added to this replicated active object list).
Note, that returned iterator doesn't support remove operation

Specified by:
iterator in interface java.lang.Iterable<E extends ActiveObject>
Specified by:
iterator in class ActiveObjectCollection<E extends ActiveObject>
Returns:
an Iterator over the elements in this replicated active object

get

public abstract E get(int index)
Returns the active object element at the specified position in this replicated active object.
The position index is the number of list element in the insertion order (i.e. the order in which active object were added to this replicated active object list). Thus, index of an element decreases when preceding elements are removed.

Parameters:
index - index of the element to return
Returns:
the element at the specified position in this list
Throws:
java.lang.IndexOutOfBoundsException - if the index is out of range (index < 0 || index >= size())


Copyright © 1991-2008 XJ Technlogies. All Rights Reserved.