edu.northwestern.at.monk.model
Class PosTrigram

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

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

A pos trigram.

See Also:
MONK Datastore Overview, Licensing Agreement

Constructor Summary
PosTrigram(Pos pos1, Pos pos2, Pos pos3)
          Creates a new pos trigram.
 
Method Summary
 int compareTo(PosTrigram other)
          Compares this instance with another.
 boolean equals(java.lang.Object obj)
          Returns true if this object equals some other object.
 Pos getPos1()
          Gets the first pos.
 Pos getPos2()
          Gets the second pos.
 Pos getPos3()
          Gets the third pos.
 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

PosTrigram

public PosTrigram(Pos pos1,
                  Pos pos2,
                  Pos pos3)
Creates a new pos trigram.

Parameters:
pos1 - First pos.
pos2 - Second pos.
pos3 - Third pos.
Method Detail

getPos1

public Pos getPos1()
Gets the first pos.

Returns:
First pos.

getPos2

public Pos getPos2()
Gets the second pos.

Returns:
Second pos.

getPos3

public Pos getPos3()
Gets the third pos.

Returns:
Third pos.

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

Pos trigrams are orderd by the frist pos, then by the second pos, then by the third pos.

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