edu.northwestern.at.monk.model
Class LemPos

java.lang.Object
  extended by edu.northwestern.at.monk.model.ComboFeature
      extended by edu.northwestern.at.monk.model.LemPos
All Implemented Interfaces:
Feature, java.lang.Comparable<LemPos>

public class LemPos
extends ComboFeature
implements Feature, java.lang.Comparable<LemPos>

A LemPos combination feature.

See Also:
MONK Datastore Overview, Licensing Agreement

Constructor Summary
LemPos(Lemma lemma, Pos pos)
          Creates a new LemPos.
 
Method Summary
 int compareTo(LemPos other)
          Compares this instance with another.
 boolean equals(java.lang.Object obj)
          Returns true if this object equals some other object.
 Lemma getLemma()
          Gets the lemma.
 Pos getPos()
          Gets the part of speech.
 int hashCode()
          Returns a hash code for this object.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LemPos

public LemPos(Lemma lemma,
              Pos pos)
Creates a new LemPos.

Parameters:
lemma - Lemma.
pos - Part of speech.
Method Detail

getLemma

public Lemma getLemma()
Gets the lemma.

Returns:
Lemma.

getPos

public Pos getPos()
Gets the part of speech.

Returns:
Part of speech.

equals

public boolean equals(java.lang.Object obj)
Returns true if this object equals some other object.

Overrides:
equals in class java.lang.Object
Parameters:
obj - Other object.
Returns:
True if this object equals the other object.

hashCode

public int hashCode()
Returns a hash code for this object.

Overrides:
hashCode in class java.lang.Object
Returns:
Hash code.

compareTo

public int compareTo(LemPos other)
Compares this instance with another.

LemPos objects are ordered by lemmma first, then by pos.

Specified by:
compareTo in interface java.lang.Comparable<LemPos>
Parameters:
other - The other instance to be compared.
Returns:
A negative integer, zero, or a positive integer as this instance is less than, equal to, or greater than the specified instance.