public class IntegerProperty extends AbstractProperty<Integer>
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 |
---|
IntegerProperty(String shortName,
String description,
Integer initialValue,
Integer minimumValue,
Integer maximumValue,
String formatString,
boolean readOnly,
int displayPriority)
Construct an IntegerProperty.
|
Modifier and Type | Method and Description |
---|---|
String |
getDescription()
Return a description of the property (may use HTML markup).
|
String |
getFormatString() |
Integer |
getMaximumValue()
Retrieve the maximum value of this IntegerProperty.
|
Integer |
getMinimumValue()
Retrieve the minimum value of this IntegerProperty.
|
String |
getShortName()
Return a short description of the property.
|
Integer |
getValue()
Retrieve the current value of the property.
|
boolean |
isReadOnly()
Return true if the property can not be altered.
|
void |
setValue(Integer newValue)
Change the value of the property.
|
getDisplayPriority, iterator, toString
public IntegerProperty(String shortName, String description, Integer initialValue, Integer minimumValue, Integer maximumValue, String formatString, boolean readOnly, int displayPriority)
shortName
- String; the short name of the new IntegerPropertydescription
- String; description of the new IntegerProperty (may use HTML mark up)initialValue
- Integer; the initial value of the new IntegerPropertyminimumValue
- Integer; the minimum value of the new IntegerPropertymaximumValue
- Integer; the maximumValue of the new IntegerPropertyformatString
- String; format string to display the valuereadOnly
- boolean; if true this IntegerProperty can not be altereddisplayPriority
- int; the display priority of the new IntegerPropertypublic final Integer getValue()
getValue
in class AbstractProperty<Integer>
public final Integer getMinimumValue()
public final Integer getMaximumValue()
public final String getShortName()
getShortName
in class AbstractProperty<Integer>
public final String getDescription()
getDescription
in class AbstractProperty<Integer>
public final void setValue(Integer newValue) throws PropertyException
setValue
in class AbstractProperty<Integer>
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<Integer>
public final String getFormatString()
Copyright © 2014–2015 Delft University of Technology. All rights reserved.