Enum Class Type
- All Implemented Interfaces:
Serializable
,Comparable<Type>
,Constable
Type of a field in Protobuf, can be any value defined in https://developers.google.com/protocol-buffers/docs/proto3#scalar
or a group, message and enum.
- Since:
- 2.0
- Author:
- gustavonalle
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Returnstrue
only if the type is an unsigned numeric type,false
otherwise.boolean
static Type
primitiveFromString
(String typeName) If the type name is a primitive, it returns the corresponding enum constant, otherwise it returnsnull
.toString()
static Type
Returns the enum constant of this class with the specified name.static Type[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
DOUBLE
-
FLOAT
-
INT64
-
UINT64
-
INT32
-
FIXED64
-
FIXED32
-
BOOL
-
STRING
-
BYTES
-
UINT32
-
SFIXED32
-
SFIXED64
-
SINT32
-
SINT64
-
GROUP
-
MESSAGE
-
ENUM
-
MAP
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException
- if the argument is null
-
primitiveFromString
If the type name is a primitive, it returns the corresponding enum constant, otherwise it returnsnull
. -
getJavaType
-
getWireType
-
isUnsigned
public boolean isUnsigned()Returnstrue
only if the type is an unsigned numeric type,false
otherwise. -
isValidMapKey
public boolean isValidMapKey() -
toString
-