Interface InputParameter<VT,CT>
- Type Parameters:
VT
- Value type of the input parameterCT
- Calculated type of the input parameter (often the same as VT, except in complex maps)
- All Superinterfaces:
Cloneable
,Serializable
- All Known Implementing Classes:
AbstractInputParameter
,AbstractInputParameterMap
,AbstractInputParameterTypedMap
,InputParameterBoolean
,InputParameterDistContinuous
,InputParameterDistContinuousSelection
,InputParameterDistContinuousSelection.Beta
,InputParameterDistContinuousSelection.Constant
,InputParameterDistContinuousSelection.Erlang
,InputParameterDistContinuousSelection.Exponential
,InputParameterDistContinuousSelection.Gamma
,InputParameterDistContinuousSelection.LogNormal
,InputParameterDistContinuousSelection.Normal
,InputParameterDistContinuousSelection.Pearson5
,InputParameterDistContinuousSelection.Pearson6
,InputParameterDistContinuousSelection.Triangular
,InputParameterDistContinuousSelection.Uniform
,InputParameterDistContinuousSelection.Weibull
,InputParameterDistDiscrete
,InputParameterDistDiscreteSelection
,InputParameterDistDiscreteSelection.Bernoulli
,InputParameterDistDiscreteSelection.Binomial
,InputParameterDistDiscreteSelection.DiscreteConstant
,InputParameterDistDiscreteSelection.DiscreteUniform
,InputParameterDistDiscreteSelection.Geometric
,InputParameterDistDiscreteSelection.NegBinomial
,InputParameterDistDiscreteSelection.Poisson
,InputParameterDouble
,InputParameterDoubleScalar
,InputParameterFloat
,InputParameterFloatScalar
,InputParameterInteger
,InputParameterLong
,InputParameterMap
,InputParameterMapDistContinuous
,InputParameterMapDistDiscrete
,InputParameterSelectionList
,InputParameterSelectionMap
,InputParameterString
,InputParameterUnit
User readable and settable properties.
Copyright (c) 2013-2024 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
- Version:
- $Revision$, $LastChangedDate$, by $Author$, initial version Apr 22, 2016
- Author:
- Alexander Verbraeck, Peter Knoppers, Wouter Schakel
-
Method Summary
Modifier and TypeMethodDescriptionInputParameter<?,
?> clone()
Provide the clone() method to make a deep copy.Retrieve the calculated value of the input parameter.Retrieve the default value of the input parameter.Return a description of the input parameter (may use HTML markup).double
Display priority determines the order in which properties should be displayed.Retrieve the extended key of this AbstractInputParameter including parents with a dot-notation.getKey()
Retrieve the key of this InputParameter.Retrieve the parent input parameter.Return a short description of the input parameter.getValue()
Retrieve the current value of the input parameter.boolean
Return true if the input parameter can not be altered.void
setDefaultValue
(VT newValue) Change the default value of the input parameter.void
setReadOnly
(boolean readOnly) Specify if the input parameter can be altered.
-
Method Details
-
getKey
String getKey()Retrieve the key of this InputParameter. The key is set at time of construction and it is immutable.- Returns:
- String; the key of this InputParameter
-
getExtendedKey
String getExtendedKey()Retrieve the extended key of this AbstractInputParameter including parents with a dot-notation.- Returns:
- String; the extended key of this AbstractInputParameter
-
getValue
VT getValue()Retrieve the current value of the input parameter.- Returns:
- VT; the current value of the input parameter
-
getDefaultValue
VT getDefaultValue()Retrieve the default value of the input parameter.- Returns:
- VT; the default value of the input parameter
-
setDefaultValue
Change the default value of the input parameter.- Parameters:
newValue
- VT; the new default value for the input parameter- Throws:
NullPointerException
- when newValue is nullInputParameterException
- when this InputParameter is read-only, or newValue is not valid
-
getCalculatedValue
Retrieve the calculated value of the input parameter. This is often the same as the value type, except in situations where a sub-map or sub-list calculates a different value. This is, for instance, the case with distribution functions where the parameters are present in a sub-map (the value) and the return type of the value is a distribution function class.- Returns:
- CT; the calculated value of the input parameter
- Throws:
InputParameterException
- when calculation fails
-
getShortName
String getShortName()Return a short description of the input parameter.- Returns:
- String; a short description of the input parameter
-
getDescription
String getDescription()Return a description of the input parameter (may use HTML markup).- Returns:
- String; the description of the input parameter
-
setReadOnly
void setReadOnly(boolean readOnly) Specify if the input parameter can be altered.- Parameters:
readOnly
- boolean; true if this input parameter can not be altered, false if this input parameter can be altered
-
isReadOnly
boolean isReadOnly()Return true if the input parameter can not be altered.- Returns:
- boolean; true if this input parameter can not be altered, false if this input parameter can be altered
-
getDisplayPriority
double getDisplayPriority()Display priority determines the order in which properties should be displayed. Properties with lower values should be displayed above or before those with higher values.- Returns:
- double; the display priority of this InputParameter
-
getParent
AbstractInputParameterMap<?> getParent()Retrieve the parent input parameter.- Returns:
- the InputParameterMap that is the parent of this InputParameter (result is null if this input parameter is not contained in an InputParameterMap)
-
clone
InputParameter<?,?> clone()Provide the clone() method to make a deep copy.- Returns:
- a deep copy of the InputParameter
-