org.jnetpcap.nio
Enum JNumber.Type

java.lang.Object
  extended by java.lang.Enum<JNumber.Type>
      extended by org.jnetpcap.nio.JNumber.Type
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<JNumber.Type>
Enclosing class:
JNumber

public static enum JNumber.Type
extends java.lang.Enum<JNumber.Type>

Used to request a specific type of primitive that this number will be dealing with possibly allocating memory more efficiently to fit the primitive type.

Author:
Mark Bednarczyk, Sly Technologies, Inc.

Enum Constant Summary
BYTE
           
CHAR
           
DOUBLE
           
FLOAT
           
INT
           
LONG
           
LONGLONG
           
SHORT
           
 
Field Summary
 int size
          Size in bytes for this native type on this machine
 
Method Summary
static int getBiggestSize()
           
static JNumber.Type valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static JNumber.Type[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

BYTE

public static final JNumber.Type BYTE

CHAR

public static final JNumber.Type CHAR

INT

public static final JNumber.Type INT

SHORT

public static final JNumber.Type SHORT

LONG

public static final JNumber.Type LONG

LONGLONG

public static final JNumber.Type LONGLONG

FLOAT

public static final JNumber.Type FLOAT

DOUBLE

public static final JNumber.Type DOUBLE
Field Detail

size

public final int size
Size in bytes for this native type on this machine

Method Detail

values

public static final JNumber.Type[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(JNumber.Type c : JNumber.Type.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static JNumber.Type 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 name

getBiggestSize

public static int getBiggestSize()