Package org.apache.avro.generic
Class GenericData.EnumSymbol
java.lang.Object
org.apache.avro.generic.GenericData.EnumSymbol
- All Implemented Interfaces:
Comparable<GenericData.EnumSymbol>
,GenericContainer
,GenericEnumSymbol<GenericData.EnumSymbol>
- Enclosing class:
GenericData
public static class GenericData.EnumSymbol
extends Object
implements GenericEnumSymbol<GenericData.EnumSymbol>
Default implementation of
GenericEnumSymbol
.-
Constructor Summary
ConstructorDescriptionEnumSymbol
(Schema schema, Object symbol) Maps existing Objects into an Avro enum by calling toString(), eg for Java EnumsEnumSymbol
(Schema schema, String symbol) -
Method Summary
-
Constructor Details
-
EnumSymbol
-
EnumSymbol
Maps existing Objects into an Avro enum by calling toString(), eg for Java Enums
-
-
Method Details
-
getSchema
Description copied from interface:GenericContainer
The schema of this instance.- Specified by:
getSchema
in interfaceGenericContainer
-
equals
-
hashCode
public int hashCode() -
toString
Description copied from interface:GenericEnumSymbol
Return the symbol.- Specified by:
toString
in interfaceGenericEnumSymbol<GenericData.EnumSymbol>
- Overrides:
toString
in classObject
-
compareTo
- Specified by:
compareTo
in interfaceComparable<GenericData.EnumSymbol>
-