ca.nengo.config
Interface ListProperty

All Superinterfaces:
Property
All Known Implementing Classes:
ListPropertyImpl, TemplateArrayProperty

public interface ListProperty
extends Property

A Property that can have multiple values, each of which is identified by an integer index.

Author:
Bryan Tripp

Method Summary
 void addValue(java.lang.Object value)
           
 java.lang.Object getDefaultValue()
           
 int getNumValues()
           
 java.lang.Object getValue(int index)
           
 void insert(int index, java.lang.Object value)
           
 void remove(int index)
           
 void setValue(int index, java.lang.Object value)
           
 
Methods inherited from interface ca.nengo.config.Property
getDocumentation, getName, getType, isFixedCardinality, isMutable, setName
 

Method Detail

getValue

java.lang.Object getValue(int index)
                          throws StructuralException
Parameters:
index - Index of a certain single value of a multi-valued property
Returns:
The value at the given index
Throws:
StructuralException - if the given index is out of range

setValue

void setValue(int index,
              java.lang.Object value)
              throws StructuralException
Parameters:
index - Index of a certain single value of a multi-valued property
value - New value to replace that at the given index
Throws:
StructuralException - if the value is invalid (as in setValue) or the given index is out of range or the Property is immutable

addValue

void addValue(java.lang.Object value)
              throws StructuralException
Parameters:
value - New value to be added to the end of the list
Throws:
StructuralException - if the value is invalid (as in setValue) or the Property is immutable or fixed-cardinality

getNumValues

int getNumValues()
Returns:
Number of repeated values of this Property

insert

void insert(int index,
            java.lang.Object value)
            throws StructuralException
Parameters:
index - Index at which new value is to be inserted
value - New value
Throws:
StructuralException - if the value is invalid (as in setValue) or the Property is immutable or fixed-cardinality or the index is out of range

remove

void remove(int index)
            throws StructuralException
Parameters:
index - Index of a single value of a multi-valued property that is to be removed
Throws:
StructuralException - if the given index is out of range or the Property is immutable or fixed cardinality

getDefaultValue

java.lang.Object getDefaultValue()
Returns:
Default value for insertions TODO: remove; use default from NewConfigurableDialog (move to ConfigUtil)