public abstract class Series<O> extends Distribution
The internal list can be set to be traversed backwards and/or to repeat once its end has been reached.
| Constructor and Description |
|---|
Series(Model owner,
java.lang.String name,
boolean showInReport,
boolean showInTrace)
Creates a new Series.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(O element)
Adds a new sample entry at the end of the entry list.
|
void |
addAll(java.util.Collection<O> collection)
Adds all elements of a given Collection to the entry list.
|
void |
clearList()
Removes all entries from the sample list.
|
Reporter |
createDefaultReporter()
Creates the default reporter for the series.
|
int |
getNumberOfAvailableElements()
Returns the amount of samples this series can still return, given the
current reading direction and repeating property.
|
boolean |
isforward()
Returns whether this series is getting read forward.
|
void |
remove(int position)
Removes am entry at a certain position out of the sample list, lowering
the index of all following entries by one.
|
O |
sample()
Returns the next sample from the entry list.
|
java.lang.Object |
sampleObject()
Convenience method to return the series' sample as
Object. |
void |
set(O element,
int position)
Replaces the entry at a certain position with a given entry.
|
void |
setRepeating(boolean repeat)
Sets whether reading samples from the list is continued from start once
the last sample has been returned.
|
void |
setReverse(boolean direc)
Sets the reading direction for the sample list of this series.
|
changeRandomGenerator, getInitialSeed, getNonNegative, getNumSamples, isAntithetic, reset, reset, setAntithetic, setNonNegative, setSeedgetCorrespondingSchedulable, getDescription, getObservations, getReporter, incrementObservations, incrementObservations, reportIsOn, reportOff, reportOn, 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, getQuotedName, toStringpublic Series(Model owner, java.lang.String name, boolean showInReport, boolean showInTrace)
owner - Model : The distribution's ownername - java.lang.String : The distribution's nameshowInReport - boolean : Flag for producing reportsshowInTrace - boolean : Flag for producing trace outputpublic Reporter createDefaultReporter()
createDefaultReporter in class DistributionDistributionReporterpublic void setReverse(boolean direc)
direc - boolean : true - forward; false - backwardspublic boolean isforward()
public void setRepeating(boolean repeat)
repeat - boolean : Whether this series repeats its value list once the
last value has been returned.public void remove(int position)
position - int : The position to remove the value from.public void clearList()
public void add(O element)
element - E : entry to be addedpublic void addAll(java.util.Collection<O> collection)
collection - Collectionpublic void set(O element, int position)
element - E : The new entry to replace the old one.position - int : The position at which the entry should be replaced.public int getNumberOfAvailableElements()
public O sample()
public java.lang.Object sampleObject()
Object.
For type safety, method sample() should be preferred. However,
this method is useful for environments requiring a non-genetic access point
to obtain samples from any distribution.sampleObject in class DistributionObject.