Package com.luciad.view
Class TLcdLabelIdentifier
java.lang.Object
com.luciad.view.TLcdLabelIdentifier
Class used to uniquely identify a label. A label is specified by its layer, domain object,
its label index and sublabel index.
This class overrides the equals and hashCode implementations.
-
Constructor Summary
ConstructorDescriptionTLcdLabelIdentifier
(ILcdLayer aLayer, Object aDomainObject, int aLabelIndex, int aSubLabelIndex) Create a new LabelIdentifier using the labels domain object, a label index and a sublabel index. -
Method Summary
Modifier and TypeMethodDescriptionboolean
This implementation of equals uses a label and sublabel index to compare label identifiers.Returns the domain object used to identify a label.int
Returns the label index used to identify a label.getLayer()
Returns the layer used to identify a label.int
Returns the sublabel index used to identify a label.int
hashCode()
This implementation of hashCode uses the label and sublabel index to create a hash code for this label identifier.toString()
-
Constructor Details
-
TLcdLabelIdentifier
public TLcdLabelIdentifier(ILcdLayer aLayer, Object aDomainObject, int aLabelIndex, int aSubLabelIndex) Create a new LabelIdentifier using the labels domain object, a label index and a sublabel index.- Parameters:
aLayer
- the layer to which the domain object of the label belongs.aDomainObject
- the domain object to which the label belongs.aLabelIndex
- the label index.aSubLabelIndex
- the sublabel index.
-
-
Method Details
-
getLayer
Returns the layer used to identify a label.- Returns:
- the layer used to identify a label.
-
getDomainObject
Returns the domain object used to identify a label.- Returns:
- the domain object used to identify a label.
-
getLabelIndex
public int getLabelIndex()Returns the label index used to identify a label.- Returns:
- the label index used to identify a label.
-
getSubLabelIndex
public int getSubLabelIndex()Returns the sublabel index used to identify a label.- Returns:
- the sublabel index used to identify a label.
-
equals
This implementation of equals uses a label and sublabel index to compare label identifiers. It also checks if the domain object is exactly the same (==
) as the domain object of the givenLabelIdentifier
. -
hashCode
public int hashCode()This implementation of hashCode uses the label and sublabel index to create a hash code for this label identifier. It also uses the identity hash code (System.identityHashCode
) of the domain object and the layer. -
toString
-