Class for enum type schemas.
More...
List of all members.
Public Member Functions |
int | Ordinal (string symbol) |
| Returns the position of the given symbol within this enum. Throws AvroException if the symbol is not found in this enum.
|
bool | Contains (string symbol) |
| Checks if given symbol is in the list of enum symbols.
|
IEnumerator< string > | GetEnumerator () |
| Returns an enumerator that enumerates the symbols in this enum schema in the order of their definition.
|
override bool | Equals (object obj) |
| Checks equality of two enum schema.
|
override int | GetHashCode () |
| Hashcode function.
|
override bool | CanRead (Schema writerSchema) |
| Checks if this schema can read data written by the given schema. Used for decoding data.
|
Protected Member Functions |
internal override void | WriteJsonFields (Newtonsoft.Json.JsonTextWriter writer, SchemaNames names, string encspace) |
| Writes enum schema in JSON format.
|
Properties |
IList< string > | Symbols [get, set] |
| List of strings representing the enum symbols.
|
int | Count [get] |
| Count of enum symbols.
|
string | this[int index] [get] |
| Returns the enum symbol of the given index to the list.
|
Detailed Description
Class for enum type schemas.
Member Function Documentation
override bool Avro::EnumSchema::CanRead |
( |
Schema |
writerSchema | ) |
[inline, virtual] |
Checks if this schema can read data written by the given schema. Used for decoding data.
- Parameters:
-
writerSchema | writer schema |
- Returns:
- true if this and writer schema are compatible based on the AVRO specification, false otherwise
Reimplemented from Avro::Schema.
bool Avro::EnumSchema::Contains |
( |
string |
symbol | ) |
[inline] |
Checks if given symbol is in the list of enum symbols.
- Parameters:
-
- Returns:
- true if symbol exist, false otherwise
override bool Avro::EnumSchema::Equals |
( |
object |
obj | ) |
[inline] |
Checks equality of two enum schema.
- Parameters:
-
- Returns:
IEnumerator<string> Avro::EnumSchema::GetEnumerator |
( |
| ) |
[inline] |
Returns an enumerator that enumerates the symbols in this enum schema in the order of their definition.
- Returns:
- Enumeration over the symbols of this enum schema
override int Avro::EnumSchema::GetHashCode |
( |
| ) |
[inline] |
Hashcode function.
- Returns:
Reimplemented from Avro::Schema.
int Avro::EnumSchema::Ordinal |
( |
string |
symbol | ) |
[inline] |
Returns the position of the given symbol within this enum. Throws AvroException if the symbol is not found in this enum.
- Parameters:
-
symbol | name of the symbol to find |
- Returns:
- position of the given symbol in this enum schema
internal override void Avro::EnumSchema::WriteJsonFields |
( |
Newtonsoft.Json.JsonTextWriter |
writer, |
|
|
SchemaNames |
names, |
|
|
string |
encspace |
|
) |
| [inline, protected] |
Writes enum schema in JSON format.
- Parameters:
-
writer | JSON writer |
names | list of named schema already written |
encspace | enclosing namespace of the enum schema |
Reimplemented from Avro::NamedSchema.
Property Documentation
int Avro::EnumSchema::Count [get] |
IList<string> Avro::EnumSchema::Symbols [get, set] |
List of strings representing the enum symbols.
string Avro::EnumSchema::this[int index] [get] |
Returns the enum symbol of the given index to the list.
- Parameters:
-
- Returns:
- symbol name
The documentation for this class was generated from the following file:
- src/apache/main/Schema/EnumSchema.cs