public class TLcdFeatureArray extends Object implementsILcdFeatured
Constructor and Description |
---|
TLcdFeatureArray()
Creates a feature array containing no values for features.
|
TLcdFeatureArray(Object[] aFeatureArray)
Creates a feature array by passing the values of the features.
|
Modifier and Type | Method and Description |
---|---|
boolean |
canSetFeature(int aIndex)
Always returns true.
|
Object |
getFeature(int aIndex)
Returns the value of the feature at the given index when a value is set for that index or a higher index.
|
int |
getFeatureCount()
The highest index for which a feature value was set.
|
void |
setFeature(int aIndex,
Object aFeature)
Sets the value for a feature at the given index.
|
void |
setFeatures(Object[] aFeatureArray)
Sets the values of all features at once.
|
public TLcdFeatureArray()
public TLcdFeatureArray(Object[] aFeatureArray)
aFeatureArray
- the values of the features.public void setFeatures(Object[] aFeatureArray)
aFeatureArray
- the values of the features.public int getFeatureCount()
getFeatureCount
in interface ILcdFeatured
public Object getFeature(int aIndex) throws IndexOutOfBoundsException
getFeature
in interface ILcdFeatured
aIndex
- the index of the value to retrieve a value for.IndexOutOfBoundsException
- when the index passed is higher than the highest index for which a value was set.ILcdFeatured.setFeature(int, java.lang.Object)
public void setFeature(int aIndex, Object aFeature)
setFeature
in interface ILcdFeatured
aIndex
- the index of the feature for which the value is intended for.aFeature
- the value of the feature.ILcdFeatured.getFeature(int)
,
ILcdFeatured.canSetFeature(int)
public boolean canSetFeature(int aIndex)
canSetFeature
in interface ILcdFeatured
aIndex
- not taken into account.