public enum PType extends Enum<PType>
Enum Constant and Description |
---|
BINARY |
BOOL |
BYTE |
DOUBLE |
ENUM |
I16 |
I32 |
I64 |
LIST |
MAP |
MESSAGE |
SET |
STOP |
STRING |
VOID |
Modifier and Type | Method and Description |
---|---|
static PType |
findById(byte id)
Find the best matching type for a given ID.
|
static PType |
findByName(String name)
Find the best matching type for a type name.
|
static String |
nameForId(byte id)
Get the type name for a given type ID, or just the ID if now known.
|
String |
toString() |
static PType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static PType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final PType STOP
public static final PType VOID
public static final PType BOOL
public static final PType BYTE
public static final PType I16
public static final PType I32
public static final PType I64
public static final PType DOUBLE
public static final PType STRING
public static final PType BINARY
public static final PType ENUM
public static final PType MESSAGE
public static final PType MAP
public static final PType SET
public static final PType LIST
public final byte id
public final String name
public static PType[] values()
for (PType c : PType.values()) System.out.println(c);
public static PType 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 null@Nonnull public static PType findById(byte id)
id
- The type byte ID.@Nonnull public static PType findByName(String name)
name
- The name of the type.Copyright © 2015–2017 morimekta.net. All rights reserved.