public class ContinuousProperty extends AbstractProperty<Double>
Copyright (c) 2013-2014 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights
reserved.
BSD-style license. See OpenTrafficSim License.
Constructor and Description |
---|
ContinuousProperty(String shortName,
String description,
Double initialValue,
Double minimumValue,
Double maximumValue,
String formatString,
boolean readOnly,
int displayPriority)
Construct a ContinousProperty.
|
Modifier and Type | Method and Description |
---|---|
String |
getDescription()
Return a description of the property (may use HTML markup).
|
String |
getFormatString() |
Double |
getMaximumValue() |
Double |
getMinimumValue() |
String |
getShortName()
Return a short description of the property.
|
Double |
getValue()
Retrieve the current value of the property.
|
boolean |
isReadOnly()
Return true if the property can not be altered.
|
void |
setValue(Double newValue)
Change the value of the property.
|
getDisplayPriority, iterator, toString
public ContinuousProperty(String shortName, String description, Double initialValue, Double minimumValue, Double maximumValue, String formatString, boolean readOnly, int displayPriority)
shortName
- String; the short name of the new ContinuousPropertydescription
- String; description of the new ContinuousProperty (may use HTML mark up)initialValue
- Double; the initial value of the new ContinuousPropertyminimumValue
- Double; the minimum value of the new ContinuousPropertymaximumValue
- Double; the maximumValue of the new ContinuousPropertyformatString
- String; format string to display the valuereadOnly
- boolean; if true this ContinuousProperty can not be altereddisplayPriority
- int; the displayPriority of the new ContinuousPropertypublic final Double getValue()
getValue
in class AbstractProperty<Double>
public final Double getMinimumValue()
public final Double getMaximumValue()
public final String getShortName()
getShortName
in class AbstractProperty<Double>
public final String getDescription()
getDescription
in class AbstractProperty<Double>
public final void setValue(Double newValue) throws PropertyException
setValue
in class AbstractProperty<Double>
newValue
- T; the new value for the propertyPropertyException
- when this Property is read-only, or newValue is not validpublic final boolean isReadOnly()
isReadOnly
in class AbstractProperty<Double>
public final String getFormatString()
Copyright © 2014–2015 Delft University of Technology. All rights reserved.