|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.xj.anylogic.engine.ActiveObjectCollection<E>
E - Active Object typepublic abstract class ActiveObjectCollection<E extends ActiveObject>
Replicated active object collection interface
ActiveObjectList,
Serialized Form| Constructor Summary | |
|---|---|
ActiveObjectCollection()
|
|
| Method Summary | |
|---|---|
abstract void |
_add(E activeObject)
This method should not be called by user Call add_EONAME() method of class containing embedded object
with name EONAME |
abstract boolean |
_remove(E activeObject)
This method should not be called by user Call remove_EONAME() method of class containing embedded object
with name EONAME |
double |
average(java.lang.String fieldName)
Returns the average of (numeric) field values for all active objects in this collection |
double |
average(java.lang.String fieldName,
java.lang.String triggerFieldName)
Returns the average of (numeric) field values for all active objects in this collection which have true value of a boolean field
with name triggerFieldName (if specified) |
abstract boolean |
contains(java.lang.Object activeObject)
Returns true if this replicated active object contains the specified element. |
int |
count(java.lang.String triggerFieldName)
Returns the number of active objects in this collection which have true value of a boolean field with name
triggerFieldName |
abstract boolean |
isEmpty()
Returns true if this replicated active object contains no elements. |
abstract java.util.Iterator<E> |
iterator()
Returns an iterator over the replicated active object. |
double |
max(java.lang.String fieldName)
Returns the maximum of (numeric) field values for all active objects in this collection |
double |
max(java.lang.String fieldName,
java.lang.String triggerFieldName)
Returns the maximum of (numeric) field values for all active objects in this collection which have true value of a boolean field
with name triggerFieldName (if specified) |
double |
min(java.util.Collection<? extends ActiveObject> activeObjects,
java.lang.String fieldName,
java.lang.String triggerFieldName)
Returns the minimum of (numeric) field values for all active objects in this collection which have true value of a boolean field
with name triggerFieldName (if specified) |
double |
min(java.lang.String fieldName)
Returns the minimum of (numeric) field values for all active objects in this collection |
E |
random()
Randomly returns one active object from this collection (uses uniform distribution from the Engine) This method runs in linear time |
void |
restoreOwner(java.lang.Object owner)
This method normally should not be called by user This method restores owner of this object The method is used in snapshot saving/loading |
abstract int |
size()
Returns the number of elements in this replicated active object. |
double |
sum(java.lang.String fieldName)
Returns the sum of (numeric) field values for all active objects in this collection |
double |
sum(java.lang.String fieldName,
java.lang.String triggerFieldName)
Returns the sum of (numeric) field values for all active objects in this collection which have true value of a boolean field with
name triggerFieldName (if specified) |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ActiveObjectCollection()
| Method Detail |
|---|
public abstract void _add(E activeObject)
add_EONAME() method of class containing embedded object
with name EONAME
public abstract boolean _remove(E activeObject)
remove_EONAME() method of class containing embedded object
with name EONAME
public abstract int size()
public abstract boolean isEmpty()
public abstract boolean contains(java.lang.Object activeObject)
activeObject - element whose presence in this replicated active object is to
be tested
public abstract java.util.Iterator<E> iterator()
iterator in interface java.lang.Iterable<E extends ActiveObject>public E random()
public double sum(java.lang.String fieldName,
java.lang.String triggerFieldName)
true value of a boolean field with
name triggerFieldName (if specified)
fieldName - the name of the field (case-sensitive) to be summed uptriggerFieldName - the name of the field (case-sensitive) to be checked for
true when performing additionnull - in this case all the
active objects are taken
public double sum(java.lang.String fieldName)
fieldName - the name of the field (case-sensitive) to be summed up
public double average(java.lang.String fieldName,
java.lang.String triggerFieldName)
true value of a boolean field
with name triggerFieldName (if specified)
fieldName - the name of the field (case-sensitive) to be takentriggerFieldName - the name of the field (case-sensitive) to be checked for
true when performing calculationnull - in this case all the
active objects are taken
0 if there is no suitable active objectspublic double average(java.lang.String fieldName)
fieldName - the name of the field (case-sensitive) to be taken
0 if there is no active objects
public double min(java.util.Collection<? extends ActiveObject> activeObjects,
java.lang.String fieldName,
java.lang.String triggerFieldName)
true value of a boolean field
with name triggerFieldName (if specified)
fieldName - the name of the field (case-sensitive) to be takentriggerFieldName - the name of the field (case-sensitive) to be checked for
true when performing minimum searchnull - in this case all the
active objects are taken
Double.POSITIVE_INFINITY if there is no suitable active
objectspublic double min(java.lang.String fieldName)
fieldName - the name of the field (case-sensitive) to be taken
Double.NEGATIVE_INFINITY if there is no suitable active
objects
public double max(java.lang.String fieldName,
java.lang.String triggerFieldName)
true value of a boolean field
with name triggerFieldName (if specified)
fieldName - the name of the field (case-sensitive) to be takentriggerFieldName - the name of the field (case-sensitive) to be checked for
true when performing maximum searchnull - in this case all the
active objects are taken
Double.NEGATIVE_INFINITY if there is no suitable active
objectspublic double max(java.lang.String fieldName)
fieldName - the name of the field (case-sensitive) to be taken
Double.NEGATIVE_INFINITY if there is no suitable active
objectspublic int count(java.lang.String triggerFieldName)
true value of a boolean field with name
triggerFieldName
triggerFieldName - the name of the field (case-sensitive) to be checked for
true when performing calculationnull - in this case
activeObjects.size() is returned (i.e. all
the active objects are taken)
true value
of a boolean field with name triggerFieldNamepublic final void restoreOwner(java.lang.Object owner)
restoreOwner in interface com.xj.anylogic.engine.internal.Childowner - owner of this object, usually ActiveObject,
Experiment or
ShapeGroup
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||