public class TLcdFeaturedDataObject extends TLcdDataObject implementsILcdSelfDescribedFeatured
ILcdSelfDescribedFeatured
interface. This class is
introduced to increase compatibility with models that implement
ILcdFeatured
.Constructor and Description |
---|
TLcdFeaturedDataObject(TLcdDataType aType)
Creates a new featured data object for the given type.
|
Modifier and Type | Method and Description |
---|---|
boolean |
canSetFeature(int aIndex)
Checks whether the specified feature is editable.
|
Object |
getFeature(int aIndex)
Returns the feature
Object at the given index. |
Object |
getFeature(String aFeatureName)
Returns the value of the specified feature or
null if this object does not contain a feature with the
given name. |
int |
getFeatureCount()
Returns the number of features.
|
ILcdFeaturedDescriptor |
getFeaturedDescriptor()
Returns the
ILcdFeaturedDescriptor describing this ILcdFeatured object. |
void |
setFeature(int aIndex,
Object aFeature)
Sets the feature
Object at the given index. |
void |
setFeature(String aFeatureName,
Object aValue)
Sets the value of the specified feature.
|
public TLcdFeaturedDataObject(TLcdDataType aType)
aType
- the type for which to create new instancepublic Object getFeature(String aFeatureName)
ILcdSelfDescribedFeatured
null
if this object does not contain a feature with the
given name.getFeature
in interface ILcdSelfDescribedFeatured
aFeatureName
- the name of the featurenull
public ILcdFeaturedDescriptor getFeaturedDescriptor()
ILcdSelfDescribedFeatured
ILcdFeaturedDescriptor
describing this ILcdFeatured
object.getFeaturedDescriptor
in interface ILcdSelfDescribedFeatured
ILcdFeaturedDescriptor
describing this ILcdFeatured
object.public void setFeature(String aFeatureName, Object aValue)
ILcdSelfDescribedFeatured
setFeature
in interface ILcdSelfDescribedFeatured
aFeatureName
- the name of the feature to modifyaValue
- the new value for the featurepublic boolean canSetFeature(int aIndex)
ILcdFeatured
canSetFeature
in interface ILcdFeatured
aIndex
- a valid feature index.public Object getFeature(int aIndex) throws IndexOutOfBoundsException
ILcdFeatured
Object
at the given index.getFeature
in interface ILcdFeatured
aIndex
- a valid feature index.Object
at the given index.IndexOutOfBoundsException
- when an index is chosen greater than the result of getFeatureCount.ILcdFeatured.setFeature(int, java.lang.Object)
public int getFeatureCount()
ILcdFeatured
getFeatureCount
in interface ILcdFeatured
public void setFeature(int aIndex, Object aFeature)
ILcdFeatured
Object
at the given index.setFeature
in interface ILcdFeatured
aIndex
- a valid feature index.aFeature
- the new feature Object
.ILcdFeatured.getFeature(int)
,
ILcdFeatured.canSetFeature(int)