public class CompoundProperty extends AbstractProperty<ArrayList<AbstractProperty<?>>>
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 |
|---|
CompoundProperty(String shortName,
String description,
ArrayList<AbstractProperty<?>> initialValue,
boolean readOnly,
int displayPriority)
Construct an CompoundProperty.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(AbstractProperty<?> ap)
Add an AbstractProperty at the end of the list.
|
void |
add(int index,
AbstractProperty<?> ap)
Add an AbstractProperty at a specified position.
|
ArrayList<AbstractProperty<?>> |
displayOrderedValue()
Return the sub-items in display order.
|
AbstractProperty<?> |
findByShortName(String name)
Find an embedded AbstractProperty that has a specified shortName.
|
AbstractProperty<?> |
get(int index)
Return the sub property at a specified index.
|
String |
getDescription()
Return a description of the property (may use HTML markup).
|
String |
getShortName()
Return a short description of the property.
|
ArrayList<AbstractProperty<?>> |
getValue()
Retrieve the current value of the property.
|
boolean |
isReadOnly()
Return true if the property can not be altered.
|
void |
remove(int index)
Remove a sub property from this CompoundProperty.
|
void |
setValue(ArrayList<AbstractProperty<?>> newValue)
Change the value of the property.
|
int |
size()
Return the number of sub properties of this CompoundProperty.
|
getDisplayPriority, iterator, toStringpublic CompoundProperty(String shortName, String description, ArrayList<AbstractProperty<?>> initialValue, boolean readOnly, int displayPriority)
shortName - String; the short name of the new CompoundPropertydescription - String; description of the new CompoundProperty (may use HTML mark up)initialValue - Integer; the initial value of the new CompoundPropertyreadOnly - boolean; if true this CompoundProperty can not be altereddisplayPriority - int; the display priority of the new CompoundPropertypublic final ArrayList<AbstractProperty<?>> getValue()
getValue in class AbstractProperty<ArrayList<AbstractProperty<?>>>public final String getShortName()
getShortName in class AbstractProperty<ArrayList<AbstractProperty<?>>>public final String getDescription()
getDescription in class AbstractProperty<ArrayList<AbstractProperty<?>>>public final void setValue(ArrayList<AbstractProperty<?>> newValue) throws PropertyException
setValue in class AbstractProperty<ArrayList<AbstractProperty<?>>>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<ArrayList<AbstractProperty<?>>>public final AbstractProperty<?> findByShortName(String name)
name - String; the name of the sought embedded AbstractPropertypublic final void add(int index,
AbstractProperty<?> ap)
throws PropertyException
index - int; the position where the AbstractProperty must be addedap - AbstractProperty; the property to addPropertyException - when this CompoundProperty is read-only, or index is out of rangepublic final void add(AbstractProperty<?> ap) throws PropertyException
ap - AbstractProperty; the property to addPropertyException - when this CompoundProperty is read-onlypublic final void remove(int index)
throws PropertyException
index - int; the position of the sub property to removePropertyException - when this CompoundProperty is read-only, or index is out of rangepublic final int size()
public final AbstractProperty<?> get(int index) throws PropertyException
index - int; the index of the property to retrievePropertyException - when index is out of rangepublic final ArrayList<AbstractProperty<?>> displayOrderedValue()
Copyright © 2014–2015 Delft University of Technology. All rights reserved.