public static enum NumberOperations.ClassInfo extends Enum<NumberOperations.ClassInfo>
Number classes supported including
their rank in terms of numeric precision.| Enum Constant and Description |
|---|
BYTE
Byte: rank 0, integral type
|
DOUBLE
Double: rank 5, non-integral type
|
FLOAT
Float: rank 4, non-integral type
|
INTEGER
Integer: rank 2, integral type
|
LONG
Long: rank 3, integral type
|
SHORT
Short: rank 1, integral type
|
| Modifier and Type | Method and Description |
|---|---|
static NumberOperations.ClassInfo |
get(Class<? extends Number> clazz)
Gets the ClassInfo type for the given class
|
Class<? extends Number> |
getNumberClass()
Gets the class that this type relates to
|
int |
getRank()
Gets the relative rank of this type in terms of numeric precision.
|
boolean |
isIntegral()
Tests if this is an integral type
|
String |
toString()
Gets a String representation of this type
|
static NumberOperations.ClassInfo |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static NumberOperations.ClassInfo[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final NumberOperations.ClassInfo BYTE
public static final NumberOperations.ClassInfo SHORT
public static final NumberOperations.ClassInfo INTEGER
public static final NumberOperations.ClassInfo LONG
public static final NumberOperations.ClassInfo FLOAT
public static final NumberOperations.ClassInfo DOUBLE
public static NumberOperations.ClassInfo[] values()
for (NumberOperations.ClassInfo c : NumberOperations.ClassInfo.values()) System.out.println(c);
public static NumberOperations.ClassInfo valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic int getRank()
public Class<? extends Number> getNumberClass()
public boolean isIntegral()
public String toString()
toString in class Enum<NumberOperations.ClassInfo>ClassInfo<classname>"public static NumberOperations.ClassInfo get(Class<? extends Number> clazz)
clazz - a Number classnull if the class is not
recognizedCopyright © 2009–2018. All rights reserved.