Sha256: 2653293cfc2d454c398392affa208701d5749628258a1e9016478fa7aa53df29

Contents?: true

Size: 1.59 KB

Versions: 164

Compression:

Stored size: 1.59 KB

Contents

package sh.calaba.org.codehaus.jackson.node;

import java.math.BigDecimal;
import java.math.BigInteger;

import sh.calaba.org.codehaus.jackson.JsonParser;

/**
 * Intermediate value node used for numeric nodes.
 */
public abstract class NumericNode
    extends ValueNode
{
    protected NumericNode() { }

    @Override
    public final boolean isNumber() { return true; }

    // // // Let's re-abstract so sub-classes handle them

    @Override
    public abstract JsonParser.NumberType getNumberType();

    @Override
    public abstract Number getNumberValue();
    @Override
    public abstract int getIntValue();
    @Override
    public abstract long getLongValue();
    @Override
    public abstract double getDoubleValue();
    @Override
    public abstract BigDecimal getDecimalValue();
    @Override
    public abstract BigInteger getBigIntegerValue();

    /* 
    /**********************************************************
    /* General type coercions
    /**********************************************************
     */
    
    @Override
    public abstract String asText();

    @Override
    public int asInt() {
        return getIntValue();
    }
    @Override
    public int asInt(int defaultValue) {
        return getIntValue();
    }

    @Override
    public long asLong() {
        return getLongValue();
    }
    @Override
    public long asLong(long defaultValue) {
        return getLongValue();
    }
    
    @Override
    public double asDouble() {
        return getDoubleValue();
    }
    @Override
    public double asDouble(double defaultValue) {
        return getDoubleValue();
    }
}

Version data entries

164 entries across 164 versions & 2 rubygems

Version Path
calabash-android-0.4.20.1 test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/NumericNode.java
calabash-android-0.5.2 test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/NumericNode.java
calabash-android-0.5.2.pre1 test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/NumericNode.java
calabash-android-0.5.1 test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/NumericNode.java
calabash-android-0.5.0 test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/NumericNode.java
calabash-android-0.5.0.pre2 test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/NumericNode.java
calabash-android-0.5.0.pre1 test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/NumericNode.java
calabash-android-0.4.22.pre4 test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/NumericNode.java
calabash-android-0.4.22.pre3 test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/NumericNode.java
calabash-android-0.4.22.pre1 test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/NumericNode.java
calabash-android-0.4.21 test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/NumericNode.java
calabash-android-0.4.20 test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/NumericNode.java
calabash-android-0.4.19 test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/NumericNode.java
calabash-android-0.4.19.pre4 test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/NumericNode.java
calabash-android-0.4.19.pre3 test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/NumericNode.java
calabash-android-0.4.19.pre2 test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/NumericNode.java
calabash-android-0.4.19.pre1 test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/NumericNode.java
calabash-android-0.4.18 test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/NumericNode.java
calabash-android-0.4.16 test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/NumericNode.java
calabash-android-0.4.15.pre2 test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/NumericNode.java