is Class Number type - Android java.lang.reflect

Android examples for java.lang.reflect:Field

Description

is Class Number type

Demo Code


//package com.java2s;

public class Main {
    public static boolean isNumber(Class<?> claxx) {
        return claxx == long.class || claxx == Long.class
                || claxx == int.class || claxx == Integer.class
                || claxx == short.class || claxx == Short.class
                || claxx == byte.class || claxx == Byte.class;
    }//  w w  w. ja va  2s .c om
}

Related Tutorials