org.apache.manifoldcf.crawler.jobs
Class HopCount.Question

java.lang.Object
  extended by org.apache.manifoldcf.crawler.jobs.HopCount.Question
Enclosing class:
HopCount

protected static class HopCount.Question
extends java.lang.Object

A class describing a document identifier and a link type, to be used in looking up the appropriate node in the hash.


Field Summary
protected  java.lang.String documentIdentifierHash
          Document identifier.
protected  java.lang.String linkType
          Link type.
 
Constructor Summary
HopCount.Question(java.lang.String documentIdentifierHash, java.lang.String linkType)
          Constructor.
 
Method Summary
 boolean equals(java.lang.Object o)
          The 'question' is uniquely described by linktype, document identifier, and maximum hop count.
 java.lang.String getDocumentIdentifierHash()
          Get the document identifier.
 java.lang.String getLinkType()
          Get the link type.
 int hashCode()
          Hash must agree with equals, above.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

documentIdentifierHash

protected java.lang.String documentIdentifierHash
Document identifier.


linkType

protected java.lang.String linkType
Link type.

Constructor Detail

HopCount.Question

public HopCount.Question(java.lang.String documentIdentifierHash,
                         java.lang.String linkType)
Constructor.

Method Detail

getDocumentIdentifierHash

public java.lang.String getDocumentIdentifierHash()
Get the document identifier.


getLinkType

public java.lang.String getLinkType()
Get the link type.


equals

public boolean equals(java.lang.Object o)
The 'question' is uniquely described by linktype, document identifier, and maximum hop count. However, there is good reason to want to merge answers where possible that have the same linktype and document identifier, so that's what we key on for hashing.

Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Hash must agree with equals, above.

Overrides:
hashCode in class java.lang.Object