public class IlvFeatureAttributeProperty extends IlvAttributeProperty
IlvNamedProperty
object, it can be attached to graphic object
layers or managers, and, possibly, saved to ivl
files. IlvMapFeature
,
IlvFeatureAttribute
,
Serialized FormNAME
Constructor and Description |
---|
IlvFeatureAttributeProperty(IlvAttributeInfoProperty info,
IlvFeatureAttribute[] values)
Creates an instance of the class
IlvFeatureAttributeProperty . |
IlvFeatureAttributeProperty(IlvFeatureAttributeProperty source)
Creates a new
IlvFeatureAttributeProperty object by copying
an existing one. |
IlvFeatureAttributeProperty(IlvInputStream stream)
Creates a new
IlvFeatureAttributeProperty object from
an IlvInputStream object. |
Modifier and Type | Method and Description |
---|---|
IlvNamedProperty |
copy()
Copies the property.
|
IlvFeatureAttribute |
getAttribute(int i)
Returns the attribute of the specified index.
|
IlvFeatureAttribute |
getAttribute(String name)
Returns the attribute specified by its name.
|
void |
setAttribute(int i,
IlvFeatureAttribute attribute)
Sets the value of the attribute specified by the index
i
to value . |
void |
setAttribute(String name,
IlvFeatureAttribute value)
Sets the value of the attribute specified by its name
to
value . |
void |
unsafeSetAttribute(int i,
IlvFeatureAttribute attribute)
Sets the value of the attribute specified by the index
i
to value , without checking any conditions. |
getInfo, getValue, getValue, isPersistent, setPersistent, setValue, setValue, unsafeSetValue, write
getName
public IlvFeatureAttributeProperty(IlvAttributeInfoProperty info, IlvFeatureAttribute[] values)
IlvFeatureAttributeProperty
.info
- The description of the attributes (names, classes etc.)values
- The array of feature attributesIllegalArgumentException
- if the array of values differs from
the number of attributes specified by the info
argument or if the classes of the values are different from
the classes specified in info
.public IlvFeatureAttributeProperty(IlvFeatureAttributeProperty source)
IlvFeatureAttributeProperty
object by copying
an existing one.
The IlvAttributeInfoProperty
is not copied,
which means that the source and the copy will share the same instance
of IlvAttributeInfoProperty
.
The attribute array and the attributes themselves are copied.
source
- The feature attribute property to be copied.public IlvFeatureAttributeProperty(IlvInputStream stream) throws IlvReadFileException
IlvFeatureAttributeProperty
object from
an IlvInputStream
object.stream
- The input streamIlvReadFileException
- if an error occurs while reading.public IlvFeatureAttribute getAttribute(int i)
i
- The index of the attributei
.public IlvFeatureAttribute getAttribute(String name)
name
- The name of the attributeIllegalArgumentException
- if name
is not
the name of an attribute.public void setAttribute(int i, IlvFeatureAttribute attribute)
i
to value
.
The attribute values you set must be checked against the
following conditions:
i
- The index of the attribute to be setattribute
- The value to which the specified attribute will be set.IllegalArgumentException
- if the index is higher than the
number of attributes or if the class of the value is
incompatible with the class of this attribute.public void unsafeSetAttribute(int i, IlvFeatureAttribute attribute)
i
to value
, without checking any conditions. This method must be used with
caution. If the conditions checked by the setAttribute
method
are not met, the object will be in an inconsistent state.i
- The index of the attribute to be set.attribute
- The value to which the specified attribute will be set.public void setAttribute(String name, IlvFeatureAttribute value)
value
.name
- The name of the attribute to be set.value
- The value to which the specified attribute will be set.IllegalArgumentException
- if name
is not the
name of an attribute or if the class of the value is
incompatible with the class of this attribute.public IlvNamedProperty copy()
IlvAttributeInfoProperty
is not copied, that is
the source and the copy will share the same instance of
IlvAttributeInfoProperty
.
The attribute array and the attributes themselves are copied.
copy
in class IlvAttributeProperty
© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.