Class CMapBlock


  • public class CMapBlock
    extends java.lang.Object
    Immutable second-level blocks for constructing the two-level character map table.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      int[] block
      array of BLOCK_SIZE; reference immutable; contents intended to be as well
      static int BLOCK_BITS
      How many bits the second-level char map tables translate
      static int BLOCK_SIZE
      Size of the second-level char map arrays
      private int hash
      pre-computed hash, since we will compare often
    • Constructor Summary

      Constructors 
      Constructor Description
      CMapBlock​(int[] block)
      Constructs new CMapBlock and pre-computes its hash
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object other)  
      int hashCode()  
      • Methods inherited from class java.lang.Object

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

      • BLOCK_BITS

        public static final int BLOCK_BITS
        How many bits the second-level char map tables translate
        See Also:
        Constant Field Values
      • BLOCK_SIZE

        public static final int BLOCK_SIZE
        Size of the second-level char map arrays
        See Also:
        Constant Field Values
      • block

        public final int[] block
        array of BLOCK_SIZE; reference immutable; contents intended to be as well
      • hash

        private final int hash
        pre-computed hash, since we will compare often
    • Constructor Detail

      • CMapBlock

        public CMapBlock​(int[] block)
        Constructs new CMapBlock and pre-computes its hash
        Parameters:
        block - an int array of size @{link BLOCK_SIZE}.
    • Method Detail

      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object other)
        Overrides:
        equals in class java.lang.Object