public class StringProperty extends AbstractProperty<String> implements Serializable
Copyright (c) 2013-2016 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
$LastChangedDate: 2015-07-26 01:01:13 +0200 (Sun, 26 Jul 2015) $, @version $Revision: 1155 $, by $Author: averbraeck $,
initial version 29 dec. 2014
AbstractProperty.PropertyIterator
Constructor and Description |
---|
StringProperty(String key,
String shortName,
String description,
String initialValue,
boolean readOnly,
int displayPriority)
Construct an StringProperty.
|
Modifier and Type | Method and Description |
---|---|
AbstractProperty<String> |
deepCopy()
Construct a deep copy of this property (duplicates everything except immutable fields).
|
String |
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(String 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 StringProperty(String key, String shortName, String description, String initialValue, boolean readOnly, int displayPriority)
key
- String; the unique key of the new propertyshortName
- String; the short name of the new StringPropertydescription
- String; description of the new StringProperty (may use HTML mark up)initialValue
- Integer; the initial value of the new StringPropertyreadOnly
- boolean; if true this StringProperty can not be altereddisplayPriority
- int; the displayPriority of the new StringPropertypublic final String getValue()
public final void setValue(String newValue) throws PropertyException
setValue
in interface Property<String>
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<String>
htmlStateDescription
in class AbstractProperty<String>
public final AbstractProperty<String> deepCopy()
Copyright © 2014–2016 Delft University of Technology. All rights reserved.