Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package com.fasterxml.jackson.core.sym;

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)

public final class Name2
    extends Name
    final int mQuad1;
    final int mQuad2;
    Name2(String nameint hashint quad1int quad2)
         = quad1;
         = quad2;
    public boolean equals(int quad) { return false; }
    public boolean equals(int quad1int quad2)
        return (quad1 == ) && (quad2 == );
    public boolean equals(int[] quadsint qlen)
        return (qlen == 2 && quads[0] ==  && quads[1] == );
New to GrepCode? Check out our FAQ X