com.fasterxml.jackson.databind.node.IntNode.java Source code

Java tutorial

Introduction

Here is the source code for com.fasterxml.jackson.databind.node.IntNode.java

Source

package com.fasterxml.jackson.databind.node;

import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.io.NumberOutput;
import com.fasterxml.jackson.databind.SerializerProvider;

public final class IntNode extends NumericNode {
    private static final IntNode[] CANONICALS = new IntNode[12];
    final int _value;

    static {
        for (int i = 0; i < 12; i++)
            CANONICALS[i] = new IntNode(i - 1);
    }

    public IntNode(int paramInt) {
        this._value = paramInt;
    }

    public static IntNode valueOf(int paramInt) {
        if ((paramInt > 10) || (paramInt < -1))
            return new IntNode(paramInt);
        return CANONICALS[(paramInt + 1)];
    }

    public String asText() {
        return NumberOutput.toString(this._value);
    }

    public boolean equals(Object paramObject) {
        if (paramObject == this)
            ;
        do {
            return true;
            if (paramObject == null)
                return false;
            if (paramObject.getClass() != getClass())
                return false;
        } while (((IntNode) paramObject)._value == this._value);
        return false;
    }

    public int hashCode() {
        return this._value;
    }

    public long longValue() {
        return this._value;
    }

    public final void serialize(JsonGenerator paramJsonGenerator, SerializerProvider paramSerializerProvider) {
        paramJsonGenerator.writeNumber(this._value);
    }
}

/* Location:           /Users/dantheman/src/fffffffffattttt/basis/classes_dex2jar.jar
 * Qualified Name:     com.fasterxml.jackson.databind.node.IntNode
 * JD-Core Version:    0.6.2
 */