public class ContinuousProperty extends AbstractProperty<Double> implements Serializable
Copyright (c) 2013-2018 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
$LastChangedDate: 2016-05-28 11:33:31 +0200 (Sat, 28 May 2016) $, @version $Revision: 2051 $, by $Author: averbraeck $,
initial version 30 dec. 2014
| Constructor and Description |
|---|
ContinuousProperty(String key,
String shortName,
String description,
Double initialValue,
Double minimumValue,
Double maximumValue,
boolean includesLowerBound,
boolean includesUpperBound,
String formatString,
boolean readOnly,
int displayPriority)
Construct a ContinousProperty.
|
ContinuousProperty(String key,
String shortName,
String description,
Double initialValue,
Double minimumValue,
Double maximumValue,
String formatString,
boolean readOnly,
int displayPriority)
Construct a ContinousProperty that is inclusive of lowerBound and upperBound.
|
| Modifier and Type | Method and Description |
|---|---|
AbstractProperty<Double> |
deepCopy()
Construct a deep copy of this property (duplicates everything except immutable fields).
|
String |
getFormatString() |
Double |
getMaximumValue() |
Double |
getMinimumValue() |
Double |
getValue()
Retrieve the current value of the property.
|
String |
htmlStateDescription()
Generate a description of the state of this property in HTML (excluding the <html> at the start and the
</html> at the end.
|
boolean |
includesLowerBound()
Is the range inclusive of the minimumValue?
|
boolean |
includesUpperBound()
Is the range inclusive of the maximumValue?
|
void |
setValue(Double newValue)
Change the value of the property.
|
findByKey, getDescription, getDisplayPriority, getKey, getParent, getShortName, isReadOnly, iterator, setParent, setReadOnly, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitforEach, spliteratorpublic ContinuousProperty(String key, String shortName, String description, Double initialValue, Double minimumValue, Double maximumValue, String formatString, boolean readOnly, int displayPriority)
key - String; the unique key of the new propertyshortName - 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 ContinuousProperty (may be out of range)minimumValue - 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 ContinuousProperty(String key, String shortName, String description, Double initialValue, Double minimumValue, Double maximumValue, boolean includesLowerBound, boolean includesUpperBound, String formatString, boolean readOnly, int displayPriority)
key - String; the unique key of the new propertyshortName - 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 ContinuousProperty (may be out of range)minimumValue - Double; the minimum value of the new ContinuousPropertymaximumValue - Double; the maximumValue of the new ContinuousPropertyincludesLowerBound - boolean; if true, the minimumValue is valid; if false, the minimumValue is not validincludesUpperBound - boolean; if true, the maximumValue is valid; if false, the maximumValue is not validformatString - 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()
public final Double getMinimumValue()
public final Double getMaximumValue()
public final void setValue(Double newValue) throws PropertyException
setValue in interface Property<Double>newValue - T; the new value for the propertyPropertyException - when this Property is read-only, or newValue is not validpublic final String getFormatString()
public final String htmlStateDescription()
htmlStateDescription in interface Property<Double>htmlStateDescription in class AbstractProperty<Double>public final AbstractProperty<Double> deepCopy()
public final boolean includesLowerBound()
public final boolean includesUpperBound()
Copyright © 2014–2018 Delft University of Technology. All rights reserved.