Class 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

      Fields 
      Modifier and Type Field Description
      protected java.lang.String documentIdentifierHash
      Document identifier.
      protected java.lang.String linkType
      Link type.
    • Constructor Summary

      Constructors 
      Constructor Description
      Question​(java.lang.String documentIdentifierHash, java.lang.String linkType)
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      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

      • Question

        public 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