edu.northwestern.at.monk.model
Class LemmaBigram

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

public class LemmaBigram
extends java.lang.Object
implements Feature, java.lang.Comparable<LemmaBigram>

A lemma bigram.

See Also:
MONK Datastore Overview, Licensing Agreement

Constructor Summary
LemmaBigram(Lemma lemma1, Lemma lemma2)
          Creates a new lemma bigram.
 
Method Summary
 int compareTo(LemmaBigram other)
          Compares this instance with another.
 boolean equals(java.lang.Object obj)
          Returns true if this object equals some other object.
 Lemma getLemma1()
          Gets the first lemma.
 Lemma getLemma2()
          Gets the second lemma.
 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

LemmaBigram

public LemmaBigram(Lemma lemma1,
                   Lemma lemma2)
Creates a new lemma bigram.

Parameters:
lemma1 - First lemma.
lemma2 - Second lemma.
Method Detail

getLemma1

public Lemma getLemma1()
Gets the first lemma.

Returns:
First lemma.

getLemma2

public Lemma getLemma2()
Gets the second lemma.

Returns:
Second lemma.

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(LemmaBigram other)
Compares this instance with another.

Lemma bigrams are orderd by the frist lemma, then by the second lemma.

Specified by:
compareTo in interface java.lang.Comparable<LemmaBigram>
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.