- java.lang.Object
-
- java.lang.Enum<JavaType>
-
- org.ojalgo.machine.JavaType
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<JavaType>
public enum JavaType extends java.lang.Enum<JavaType>
B byte signed byte C char Unicode character code point in the Basic Multilingual Plane, encoded with UTF-16 D double double-precision floating-point value F float single-precision floating-point value I int integer J long long integer L ClassName ; reference an instance of class ClassName S short signed short Z boolean true or false [ reference one array dimensionhttps://stackoverflow.com/questions/32768036/why-is-l-the-prefix-for-reference-types-instead-of-some-other-letter
-
-
Field Summary
Fields Modifier and Type Field Description private intmyInformationBitsprivate java.lang.Class<?>myJavaClassprivate longmyMemoryBytes
-
Constructor Summary
Constructors Modifier Constructor Description privateJavaType(java.lang.Class<?> aClass, int informationBits, long memoryBytes)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.lang.Class<?>box(java.lang.Class<?> type)Return the boxed wrapper type for a primitiveClass.longestimateSizeOfWrapperClass()(package private) intgetInformationBits()java.lang.Class<?>getJavaClass()static JavaTypematch(java.lang.Class<?> aClass)longmemory()static java.lang.Class<?>resolveType(java.lang.String name)static java.lang.Class<?>unbox(java.lang.Class<?> type)Return the primitive type for a boxed wrapperClass.static JavaTypevalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static JavaType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
BOOLEAN
public static final JavaType BOOLEAN
-
BYTE
public static final JavaType BYTE
-
CHAR
public static final JavaType CHAR
-
DOUBLE
public static final JavaType DOUBLE
-
FLOAT
public static final JavaType FLOAT
-
INT
public static final JavaType INT
-
LONG
public static final JavaType LONG
-
REFERENCE
public static final JavaType REFERENCE
4 bytes with 32-bit JVM or 64-bit JVM with compressed pointers (All JVM:s assigned less than 32GB)
-
SHORT
public static final JavaType SHORT
-
-
Method Detail
-
values
public static JavaType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (JavaType c : JavaType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static JavaType valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
box
public static java.lang.Class<?> box(java.lang.Class<?> type)
Return the boxed wrapper type for a primitiveClass. If the input isnullor not a primitive, it is returned unchanged. Examples:int.class -> Integer.class,void.class -> Void.class.
-
unbox
public static java.lang.Class<?> unbox(java.lang.Class<?> type)
Return the primitive type for a boxed wrapperClass. If the input isnullor not a wrapper, it is returned unchanged. Examples:Integer.class -> int.class.
-
match
public static final JavaType match(java.lang.Class<?> aClass)
-
estimateSizeOfWrapperClass
public final long estimateSizeOfWrapperClass()
-
getJavaClass
public java.lang.Class<?> getJavaClass()
-
memory
public final long memory()
-
getInformationBits
final int getInformationBits()
-
resolveType
public static java.lang.Class<?> resolveType(java.lang.String name) throws java.lang.ClassNotFoundException- Throws:
java.lang.ClassNotFoundException
-
-