java.lang.Object
net.i2p.router.message.OutboundCache.HashPair
Enclosing class:
OutboundCache

static class OutboundCache.HashPairextends Object
Composite key for caches, combining source and destination Hashes. Implements robust hashCode and equals for minimal collisions.
  • Field Details

    • sh

      private final Hash sh
      The session's remote hash.
    • dh

      private final Hash dh
      The session's local hash.
  • Constructor Details

    • HashPair

      HashPair(Hash s, Hash d)
      Hash pair.
      Parameters:
      s - source Hash, the first half of the composite cache key
      d - destination Hash, the second half of the composite cache key
  • Method Details

    • hashCode

      public int hashCode()
      Computes the hash code for this pair.
      Overrides:
      hashCode in class Object
      Returns:
      whether h code is present
    • equals

      public boolean equals(Object o)
      Whether this pair equals the given object.
      Overrides:
      equals in class Object