public class TLcdS57Identifier extends Object implements ILcdS57Identifier, Serializable,ILcdFeatured, ILcdCloneable
ILcdS57Identifier
interface.Constructor and Description |
---|
TLcdS57Identifier(int aObjectClassCode,
ILcdS57Attribute[] aAttributes)
Constructs a new S-57 editable identifier, initialized with the given object class code.
|
TLcdS57Identifier(TLcdS57ObjectClassDescriptor aObjectClassDescriptor,
ILcdS57Attribute[] aAttributes)
Constructs a new S-57 editable identifier, initialized with the given object class descriptor.
|
TLcdS57Identifier(TLcdS57ObjectClassDescriptor aObjectClassDescriptor,
ILcdS57Attribute[] aAttributes,
int aIdentifier)
Constructs a new S-57 editable identifier, initialized with the given object class descriptor.
|
TLcdS57Identifier(TLcdS57ObjectClassDescriptor aObjectClassDescriptor,
ILcdS57Attribute[] aAttributes,
int aIdentifier,
long aLongName)
Constructs a new S-57 editable identifier, initialized with the given object class descriptor, attributes, id and long name.
|
Modifier and Type | Method and Description |
---|---|
void |
addAttribute(ILcdS57Attribute aAttribute)
Adds the given attribute to this S-57 identifier.
|
boolean |
canSetFeature(int aIndex)
Checks whether the specified feature is editable.
|
Object |
clone()
Makes
Object.clone() public. |
boolean |
equals(Object o) |
Object |
getFeature(int aIndex)
Returns the feature
Object at the given index. |
int |
getFeatureCount()
Returns the number of features.
|
int |
getId()
Returns the id of this S-57 identifier, uniquely identifying the S-57 feature within the
model.
|
long |
getLongName()
Gets the "Long Name" of this S-57 feature object.
|
TLcdS57ObjectClassDescriptor |
getObjectClassDescriptor()
Returns the S-57 object class descriptor, describing this identifier.
|
ILcdS57Attribute |
getS57Attribute(int aIndex)
Gets the TLcdS57Attribute at a given index.
|
int |
getS57AttributeCount()
Gets the number of TLcdS57Attributes stored in this identifier.
|
ILcdS57Attribute |
getS57AttributeForCode(int aRequestedCode)
Gets the TLcdS57Attribute that has the given code.
|
int |
getS57ObjectClass()
Gets the object class.
|
int |
hashCode() |
boolean |
isSimilar(ILcdS57Identifier aIdentifier)
Returns whether the given identifier is similar to this identifier,
meaning they have the same object class and attribute values, but that
the given identifier can have more attributes than this one.
|
void |
removeAttribute(ILcdS57Attribute aAttribute)
Removes the specified attribute from this S-57 identifier.
|
void |
setFeature(int aIndex,
Object aFeature)
Sets the feature
Object at the given index. |
String |
toString() |
public TLcdS57Identifier(int aObjectClassCode, ILcdS57Attribute[] aAttributes)
aObjectClassCode
- public TLcdS57Identifier(TLcdS57ObjectClassDescriptor aObjectClassDescriptor, ILcdS57Attribute[] aAttributes)
aObjectClassDescriptor
- public TLcdS57Identifier(TLcdS57ObjectClassDescriptor aObjectClassDescriptor, ILcdS57Attribute[] aAttributes, int aIdentifier)
aObjectClassDescriptor
- public TLcdS57Identifier(TLcdS57ObjectClassDescriptor aObjectClassDescriptor, ILcdS57Attribute[] aAttributes, int aIdentifier, long aLongName)
aObjectClassDescriptor
- The object class descriptor, leave null
for an unknown descriptor.aAttributes
- The attributes, ordered ascendingly according to the attribute code.aIdentifier
- The identifier
, leave -1
if unknown.aLongName
- The long name
, leave -1
if unknown.public int getId()
public long getLongName()
ILcdS57Identifier
(FIDS << 48) | (FIDN << 16) | AGEN
, where:
getLongName
in interface ILcdS57Identifier
public TLcdS57ObjectClassDescriptor getObjectClassDescriptor()
public void addAttribute(ILcdS57Attribute aAttribute)
aAttribute
- the attribute to be added to this S-57 identifier.public void removeAttribute(ILcdS57Attribute aAttribute)
aAttribute
- the attribute to be removed.IllegalArgumentException
- if the specified attribute is not an attribute of this S-57
identifier.public int getS57ObjectClass()
ILcdS57Identifier
getS57ObjectClass
in interface ILcdS57Identifier
public int getS57AttributeCount()
ILcdS57Identifier
getS57AttributeCount
in interface ILcdS57Identifier
public ILcdS57Attribute getS57Attribute(int aIndex)
ILcdS57Identifier
getS57Attribute
in interface ILcdS57Identifier
public ILcdS57Attribute getS57AttributeForCode(int aRequestedCode)
ILcdS57Identifier
getS57AttributeForCode
in interface ILcdS57Identifier
public boolean isSimilar(ILcdS57Identifier aIdentifier)
ILcdS57Identifier
isSimilar
in interface ILcdS57Identifier
public 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) throws IllegalArgumentException
ILcdFeatured
Object
at the given index.setFeature
in interface ILcdFeatured
aIndex
- a valid feature index.aFeature
- the new feature Object
.IllegalArgumentException
- if the feature can't be set.ILcdFeatured.getFeature(int)
,
ILcdFeatured.canSetFeature(int)
public Object clone()
ILcdCloneable
Makes Object.clone()
public.
java.lang.Object
, it can be implemented like this:
public Object clone() {
try {
return super.clone();
} catch ( CloneNotSupportedException e ) {
// Cannot happen: extends from Object and implements Cloneable (see also Object.clone)
throw new RuntimeException( e );
}
}
clone
in interface ILcdCloneable
clone
in class Object
Object.clone()