public class BoolDistConstant extends BoolDist
Distribution
Constructor and Description |
---|
BoolDistConstant(Model owner,
java.lang.String name,
boolean constantValue,
boolean showInReport,
boolean showInTrace)
Creates a constant boolean "pseudo" distribution with the constant value
given as parameter.
|
Modifier and Type | Method and Description |
---|---|
Reporter |
createDefaultReporter()
Creates the default reporter for the
BoolDistConstant
distribution. |
boolean |
getConstantValue()
Returns the constant boolean value associated with this
BoolDistConstant distribution |
boolean |
sample()
Returns the next constant boolean sample of this distribution.
|
void |
setConstant(boolean newValue)
Changes the constant value to the new one specified.
|
sampleObject
changeRandomGenerator, getInitialSeed, getNonNegative, getNumSamples, isAntithetic, reset, reset, setAntithetic, setNonNegative, setSeed
getCorrespondingSchedulable, getDescription, getObservations, getReporter, incrementObservations, incrementObservations, reportIsOn, reportOff, reportOn, resetAt, setCorrespondingSchedulable, setDescription, setReporter
current, currentEntity, currentEntityAll, currentEvent, currentModel, currentSimProcess, debugIsOn, debugOff, debugOn, getModel, isExperimentCompatible, isModelCompatible, presentTime, sendDebugNote, sendMessage, sendTraceNote, sendWarning, skipTraceNote, skipTraceNote, traceIsOn, traceOff, traceOn
getName, getQuotedName, toString
public BoolDistConstant(Model owner, java.lang.String name, boolean constantValue, boolean showInReport, boolean showInTrace)
owner
- Model : The distribution's ownername
- java.lang.String : The distribution's nameconstantValue
- long : The constant boolean
value produced by
this distributionshowInReport
- boolean : Flag for producing reportsshowInTrace
- boolean : Flag for producing trace outputpublic Reporter createDefaultReporter()
BoolDistConstant
distribution.createDefaultReporter
in class Distribution
BoolDistConstant
distributionDistributionReporter
public boolean getConstantValue()
BoolDistConstant
distributionBoolDistConstant
distributionpublic boolean sample()
public void setConstant(boolean newValue)
newValue
- boolean : the new constant value to be returned by this pseudo
distribution