public class BooleanProperty extends AbstractProperty<Boolean> 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 29 dec. 2014
Constructor and Description |
---|
BooleanProperty(String key,
String shortName,
String description,
Boolean initialValue,
boolean readOnly,
int displayPriority)
Construct an BooleanProperty.
|
Modifier and Type | Method and Description |
---|---|
AbstractProperty<Boolean> |
deepCopy()
Construct a deep copy of this property (duplicates everything except immutable fields).
|
Boolean |
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.
|
void |
setValue(Boolean newValue)
Change the value of the property.
|
findByKey, getDescription, getDisplayPriority, getKey, getParent, getShortName, isReadOnly, iterator, setParent, setReadOnly, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
forEach, spliterator
public BooleanProperty(String key, String shortName, String description, Boolean initialValue, boolean readOnly, int displayPriority) throws PropertyException
key
- String; the unique key of the new propertyshortName
- String; the short name of the new BooleanPropertydescription
- String; description of the new BooleanProperty (may use HTML mark up)initialValue
- Integer; the initial value of the new BooleanPropertyreadOnly
- boolean; if true this BooleanProperty can not be altereddisplayPriority
- int; the displayPriority of the new BooleanPropertyPropertyException
- if key is already in usepublic final Boolean getValue()
public final void setValue(Boolean newValue) throws PropertyException
setValue
in interface Property<Boolean>
newValue
- T; the new value for the propertyPropertyException
- when this Property is read-only, or newValue is not validpublic final String htmlStateDescription()
htmlStateDescription
in interface Property<Boolean>
htmlStateDescription
in class AbstractProperty<Boolean>
public final AbstractProperty<Boolean> deepCopy()
Copyright © 2014–2018 Delft University of Technology. All rights reserved.