public class InMemoryAlignedEntity extends java.lang.Object implements AlignedEntity
AlignedEntity
interface.
The provided implementation is immutable and, therefore, instances can be freely shared.
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
boolean |
equalsIgnoreCase(Token anotherToken)
Compares this token to another token ignoring case considerations.
|
int |
getId()
Returns the id of this aligned entity.
|
static InMemoryAlignedEntity |
getInstance(Entity entity,
int id)
Returns an
InMemoryAlignedEntity that corresponds to the specified arguments. |
java.lang.String |
getLemma()
Returns the lemma of this entity.
|
java.util.List<java.lang.String> |
getMorphologicalTags()
Returns the list of morphological tags of this entity.
|
java.lang.String |
getText()
Returns the text that forms this element.
|
java.lang.String |
getType()
Returns the type of this entity.
|
int |
hashCode() |
InMemoryAlignedEntity |
toLowerCase()
Returns the lower case representation of this aligned entity.
|
java.lang.String |
toString() |
public static InMemoryAlignedEntity getInstance(Entity entity, int id)
InMemoryAlignedEntity
that corresponds to the specified arguments.entity
- the entity that the InMemoryAlignedEntity
to create should consist of.id
- an id that identifies the alignment of the entity to create with another aligned entity within the same aligned sentence pair (one in the source sentence, and the other one in the target sentence).InMemoryAlignedEntity
that corresponds to the specified arguments.public java.lang.String getType()
Entity
public java.lang.String getLemma()
Entity
public java.lang.String getText()
LeafElement
getText
in interface LeafElement
public int getId()
AlignedEntity
getId
in interface AlignedEntity
public java.util.List<java.lang.String> getMorphologicalTags()
Entity
getMorphologicalTags
in interface Entity
public InMemoryAlignedEntity toLowerCase()
AlignedEntity
toLowerCase
in interface AlignedEntity
toLowerCase
in interface Entity
toLowerCase
in interface Token
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public boolean equalsIgnoreCase(Token anotherToken)
Token
equalsIgnoreCase
in interface Token
anotherToken
- The token to compare this token against.true
if the argument is not null
and the tokens are equal; false
otherwise.public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object