Class Name2


  • public final class Name2
    extends Name
    Specialized implementation of PName: can be used for short Strings that consists of 5 to 8 bytes. Usually this means relatively short ascii-only names.

    The reason for such specialized classes is mostly space efficiency; and to a lesser degree performance. Both are achieved for short Strings by avoiding another level of indirection (via quad arrays)

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private int q1  
      private int q2  
    • Constructor Summary

      Constructors 
      Constructor Description
      Name2​(java.lang.String name, int hash, int quad1, int quad2)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(int quad)  
      boolean equals​(int[] quads, int qlen)  
      boolean equals​(int quad1, int quad2)  
      boolean equals​(int quad1, int quad2, int q3)  
      • Methods inherited from class java.lang.Object

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

      • q1

        private final int q1
      • q2

        private final int q2
    • Constructor Detail

      • Name2

        Name2​(java.lang.String name,
              int hash,
              int quad1,
              int quad2)
    • Method Detail

      • equals

        public boolean equals​(int quad)
        Specified by:
        equals in class Name
      • equals

        public boolean equals​(int quad1,
                              int quad2)
        Specified by:
        equals in class Name
      • equals

        public boolean equals​(int quad1,
                              int quad2,
                              int q3)
        Specified by:
        equals in class Name
      • equals

        public boolean equals​(int[] quads,
                              int qlen)
        Specified by:
        equals in class Name