public class TLcdLabelIdentifier extends Object
This class overrides the equals and hashCode implementations.
Constructor and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o)
This implementation of equals uses a label and sublabel index to compare label identifiers.
|
Object |
getDomainObject()
Returns the domain object used to identify a label.
|
int |
getLabelIndex()
Returns the label index used to identify a label.
|
ILcdLayer |
getLayer()
Returns the layer used to identify a label.
|
int |
getSubLabelIndex()
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.
|
String |
toString() |
public TLcdLabelIdentifier(ILcdLayer aLayer, Object aDomainObject, int aLabelIndex, int aSubLabelIndex)
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.public ILcdLayer getLayer()
public Object getDomainObject()
public int getLabelIndex()
public int getSubLabelIndex()
public boolean equals(Object o)
==
) as the domain object
of the given LabelIdentifier
.public int hashCode()
System.identityHashCode
) of the domain object and the layer.