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

Java tutorial

Introduction

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

Source

package com.fasterxml.jackson.databind.node;

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

public final class POJONode extends ValueNode {
    protected final Object _value;

    public POJONode(Object paramObject) {
        this._value = paramObject;
    }

    public long asLong(long paramLong) {
        if ((this._value instanceof Number))
            paramLong = ((Number) this._value).longValue();
        return paramLong;
    }

    public String asText() {
        if (this._value == null)
            return "null";
        return this._value.toString();
    }

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

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

    public final void serialize(JsonGenerator paramJsonGenerator, SerializerProvider paramSerializerProvider) {
        if (this._value == null) {
            paramJsonGenerator.writeNull();
            return;
        }
        paramJsonGenerator.writeObject(this._value);
    }

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

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