Class CanonForm.CoreHash

java.lang.Object
dev.roanh.cpqindex.CanonForm.CoreHash
Enclosing class:
CanonForm

public static final class CanonForm.CoreHash extends Object
A small wrapper class for binary canonical forms that caches the hash code of the canonical form.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final byte[]
    The binary canonical form.
    private final int
    The pre computed hash code of canon.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
    CoreHash(byte[] canon)
    Constructs a new core hash by wrapping the given canonical form.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    int
     
    static final CanonForm.CoreHash
    Reads a previously written CoreHash from the given input stream.
    void
    Writes this canonical form to the given output stream.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • canon

      private final byte[] canon
      The binary canonical form.
      See Also:
    • hash

      private final int hash
      The pre computed hash code of canon.
  • Constructor Details

    • CoreHash

      private CoreHash(byte[] canon)
      Constructs a new core hash by wrapping the given canonical form.
      Parameters:
      canon - The binary canonical form to wrap.
  • Method Details