public class DataListTally.DataList extends Reportable
| Modifier and Type | Class and Description |
|---|---|
class |
DataListTally.DataList.Element
A List's Element.
|
| Constructor and Description |
|---|
DataList(Model owner,
java.lang.String name,
boolean showInReport,
boolean showInTrace)
Constructor for a new DataList
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(double value)
Adds an Element to the end of the DataList.
|
void |
clear()
Removes all Elements from this List.
|
Reporter |
createDefaultReporter()
Returns a Reporter to produce a report about this DataList.
|
DataListTally.DataList.Element |
getFirst()
Returns the list's first Element.
|
DataListTally.DataList.Element |
getLast()
Returns the list's last Element.
|
int |
getLength()
Returns the list's length.
|
java.lang.String |
getTallyName()
Returns the name of the Tally, this list belongs to.
|
DataListTally.DataList |
sort(DataListTally.DataList list)
Sorts the given list using a merge-sort algorithm
|
java.lang.String |
toString()
Creates a String containing all Elements of the list and its length.
|
getCorrespondingSchedulable, getDescription, getObservations, getReporter, incrementObservations, incrementObservations, reportIsOn, reportOff, reportOn, reset, resetAt, setCorrespondingSchedulable, setDescription, setReportercurrent, currentEntity, currentEntityAll, currentEvent, currentModel, currentSimProcess, debugIsOn, debugOff, debugOn, getModel, isExperimentCompatible, isModelCompatible, presentTime, sendDebugNote, sendMessage, sendTraceNote, sendWarning, skipTraceNote, skipTraceNote, traceIsOn, traceOff, traceOngetName, getQuotedNamepublic DataList(Model owner, java.lang.String name, boolean showInReport, boolean showInTrace)
owner - Model : The model this DataList is associated toname - java.lang.String : The name of this DataList objectshowInReport - boolean : Flag for showing the report about this DataList.showInTrace - boolean : Flag for showing the trace output of this
DataList.public Reporter createDefaultReporter()
public int getLength()
public void add(double value)
value - double : The value of the new Element in the list.public void clear()
public DataListTally.DataList sort(DataListTally.DataList list)
list - DataList : the list to be sorted.public java.lang.String toString()
toString in class NamedObjectpublic DataListTally.DataList.Element getFirst()
null if the list is empty.public DataListTally.DataList.Element getLast()
null if the list is empty.public java.lang.String getTallyName()