org.egothor.cache
Class CachedTerm

java.lang.Object
  extended by org.egothor.cache.CachedTerm

public class CachedTerm
extends java.lang.Object

Represents a triplet barrel, term, pageId, that can be used as a key of a inverted list cache.


Constructor Summary
CachedTerm(Barrel barrel, java.lang.String term, long pageId)
          Constructor for the CachedTerm object.
 
Method Summary
 boolean equals(java.lang.Object o)
          Checks whether the specified object is equal to this one.
 Barrel getBarrel()
          Gets the associated barrel.
 long getPageId()
          Gets the associated page id.
 java.lang.String getTerm()
          Gets the associated term.
 int hashCode()
          Returns a hash code value for the object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CachedTerm

public CachedTerm(Barrel barrel,
                  java.lang.String term,
                  long pageId)
Constructor for the CachedTerm object.

Parameters:
barrel - barrel the requested term is in
term - requested term
pageId - requested page id
Method Detail

getBarrel

public Barrel getBarrel()
Gets the associated barrel.

Returns:
associated barrel

getTerm

public java.lang.String getTerm()
Gets the associated term.

Returns:
associated term

getPageId

public long getPageId()
Gets the associated page id.

Returns:
associated page id

equals

public boolean equals(java.lang.Object o)
Checks whether the specified object is equal to this one.

Overrides:
equals in class java.lang.Object
Returns:
true if this object is the same as the argument; false otherwise

hashCode

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

Overrides:
hashCode in class java.lang.Object
Returns:
hash code value of this object