Package de.javagl.ply
Enum PlyType
- java.lang.Object
-
- java.lang.Enum<PlyType>
-
- de.javagl.ply.PlyType
-
- All Implemented Interfaces:
Serializable,Comparable<PlyType>
public enum PlyType extends Enum<PlyType>
An enumeration of types that may appear in PLY data. All types have aliases in PLY. For example, the typeUCHARis identical toUINT8The standard enumvalueOf(String)function can only resolve one specific representation of these types. Therefore, this enum offers avalueFor(String)method that resolves both representations to one enum value.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CHARAn 8-bit signed char (byte)DOUBLEA 64-bit floating point typeFLOATA 32-bit floating point typeINTA 32-bit signed shortSHORTA 16-bit signed shortUCHARAn 8-bit unsigned char (byte)UINTA 32-bit unsigned intUSHORTA 16-bit unsigned short
-
Field Summary
Fields Modifier and Type Field Description static PlyTypeFLOAT32An alias forFLOATstatic PlyTypeFLOAT64An alias forDOUBLEstatic PlyTypeINT16An alias forSHORTstatic PlyTypeINT32An alias forINTstatic PlyTypeINT8An alias forCHARstatic PlyTypeUINT16An alias forUSHORTstatic PlyTypeUINT32An alias forUINTstatic PlyTypeUINT8An alias forUCHAR
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static PlyTypevalueFor(String s)Returns the type that corresponds to the given string.static PlyTypevalueOf(String name)Returns the enum constant of this type with the specified name.static PlyType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
UCHAR
public static final PlyType UCHAR
An 8-bit unsigned char (byte)
-
CHAR
public static final PlyType CHAR
An 8-bit signed char (byte)
-
USHORT
public static final PlyType USHORT
A 16-bit unsigned short
-
SHORT
public static final PlyType SHORT
A 16-bit signed short
-
UINT
public static final PlyType UINT
A 32-bit unsigned int
-
INT
public static final PlyType INT
A 32-bit signed short
-
FLOAT
public static final PlyType FLOAT
A 32-bit floating point type
-
DOUBLE
public static final PlyType DOUBLE
A 64-bit floating point type
-
-
Method Detail
-
values
public static PlyType[] 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 (PlyType c : PlyType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static PlyType valueOf(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:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
valueFor
public static PlyType valueFor(String s)
Returns the type that corresponds to the given string. In contrast tovalueOf(String), this will accept all representations of types in PLY, including aliases.- Parameters:
s- The string- Returns:
- The type
- Throws:
IllegalArgumentException- If the given string does not represent a valid type
-
-