package com.fasterxml.jackson.databind.node;

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

import com.fasterxml.jackson.core.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 numberType();

    @Override public abstract Number numberValue();
    @Override public abstract int intValue();
    @Override public abstract long longValue();
    @Override public abstract double doubleValue();
    @Override public abstract BigDecimal decimalValue();
    @Override public abstract BigInteger bigIntegerValue();

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

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

    @Override
    public long asLong() {
        return longValue();
    }
    @Override
    public long asLong(long defaultValue) {
        return longValue();
    }
    
    @Override
    public double asDouble() {
        return doubleValue();
    }
    @Override
    public double asDouble(double defaultValue) {
        return doubleValue();
    }
}

@@ -1177,32 +1177,38 @@
 ride%0A    public 
+final 
 int asInt() %7B%0A  
@@ -1201,24 +1201,24 @@
 t asInt() %7B%0A
-
         retu
@@ -1263,16 +1263,22 @@
  public 
+final 
 int asIn
@@ -1350,32 +1350,38 @@
 ride%0A    public 
+final 
 long asLong() %7B%0A
@@ -1439,16 +1439,22 @@
  public 
+final 
 long asL
@@ -1534,32 +1534,38 @@
 ride%0A    public 
+final 
 double asDouble(
@@ -1610,32 +1610,32 @@
 %7D%0A    @Override%0A
-
     public doubl
@@ -1629,16 +1629,22 @@
  public 
+final 
 double a

make .asXXX() methods final (where XXX is a numeric type)