Jackson Core Source Code

Jackson is "the Java JSON library" or "the best JSON parser for Java". Or simply as "JSON for Java".

Jackson Core Source Code files are provided in the source packge (jackson-core-2.12.4-sources.jar). You can download it at Jackson Maven Website.

You can also browse Jackson Core Source Code below:

✍: FYIcenter.com

com/fasterxml/jackson/core/sym/Name2.java

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.
 *<p>
 * 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
{
    private final int q1,  q2;

    Name2(String name, int hash, int quad1, int quad2) {
        super(name, hash);
        q1 = quad1;
        q2 = quad2;
    }

    @Override
    public boolean equals(int quad) { return false; }

    @Override
    public boolean equals(int quad1, int quad2) { return (quad1 == q1) && (quad2 == q2); }

    @Override public boolean equals(int quad1, int quad2, int q3) { return false; }
    
    @Override
    public boolean equals(int[] quads, int qlen) { return (qlen == 2 && quads[0] == q1 && quads[1] == q2); }
}

com/fasterxml/jackson/core/sym/Name2.java

 

⇒ Download and Install Jackson Binary Package

⇐ What Is Jackson

⇑ Downloading and Reviewing jackson-*.jar

⇑⇑ Jackson - Java JSON library

2016-02-03, 29574👍, 1💬