Java SQL Type isNumeric(int dataType)

Here you can find the source of isNumeric(int dataType)

Description

is Numeric

License

Apache License

Declaration

public static boolean isNumeric(int dataType) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.sql.Types;
import java.util.Arrays;

import java.util.List;

public class Main {
    public static boolean isNumeric(int dataType) {
        List<Integer> numericTypes = Arrays.asList(Types.BIGINT, Types.BIT, Types.INTEGER, Types.SMALLINT,
                Types.TINYINT, Types.DECIMAL, Types.DOUBLE, Types.FLOAT, Types.NUMERIC, Types.REAL);

        return numericTypes.contains(dataType);
    }//from w ww.  jav  a2  s. com
}

Related

  1. isNativeType(final Class type)
  2. isNumberic(int type)
  3. isNumberType(int aSqlType)
  4. isNumberType(int sqlType)
  5. isNumeric(int dataType)
  6. isNumeric(int pColumnType)
  7. isNumeric(int sqlType)
  8. isNumeric(int sqlType)
  9. isNumericType(int datatype)