public enum ScalarFieldType extends Enum<ScalarFieldType> implements FieldType
| Enum Constant and Description |
|---|
BOOL |
BYTES |
DOUBLE |
FIXED32 |
FIXED64 |
FLOAT |
INT32 |
INT64 |
SFIXED32 |
SFIXED64 |
SINT32 |
SINT64 |
STRING |
UINT32 |
UINT64 |
| Modifier and Type | Method and Description |
|---|---|
static ScalarFieldType |
getByName(String name)
Get scalar type by its reference/name.
|
String |
getFullyQualifiedName()
Type reference.
|
String |
getName() |
boolean |
isBytes() |
boolean |
isEnum()
Test if this type is enum.
|
boolean |
isMap()
Test if this type is map.
|
boolean |
isMessage()
Test if this type is message.
|
boolean |
isScalar()
Test if this type is scalar.
|
boolean |
isString() |
String |
toString() |
static ScalarFieldType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ScalarFieldType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOfgetCanonicalNamepublic static final ScalarFieldType INT32
public static final ScalarFieldType INT64
public static final ScalarFieldType UINT32
public static final ScalarFieldType UINT64
public static final ScalarFieldType SINT32
public static final ScalarFieldType SINT64
public static final ScalarFieldType FIXED32
public static final ScalarFieldType FIXED64
public static final ScalarFieldType SFIXED32
public static final ScalarFieldType SFIXED64
public static final ScalarFieldType FLOAT
public static final ScalarFieldType DOUBLE
public static final ScalarFieldType BOOL
public static final ScalarFieldType STRING
public static final ScalarFieldType BYTES
public static ScalarFieldType[] values()
for (ScalarFieldType c : ScalarFieldType.values()) System.out.println(c);
public static ScalarFieldType 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 nullpublic static ScalarFieldType getByName(String name)
int32int64uint32uint64sint32sint64fixed32fixed64sfixed32sfixed64floatdoubleboolstringbytespublic String getName()
public String getFullyQualifiedName()
FieldType
int32int64uint32uint64sint32sint64fixed32fixed64sfixed32sfixed64floatdoubleboolstringbytesFor messages, it is full massage name. For enums, it is full enum name.
getFullyQualifiedName in interface FieldTypegetFullyQualifiedName in interface Typepublic boolean isScalar()
FieldTypepublic boolean isEnum()
FieldTypepublic boolean isMessage()
FieldTypepublic boolean isMap()
FieldTypepublic boolean isString()
public boolean isBytes()
public String toString()
toString in class Enum<ScalarFieldType>Copyright © 2015–2016. All rights reserved.