public class Schema<T> extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Schema.Values<T> |
Modifier | Constructor and Description |
---|---|
protected |
Schema(boolean release,
Iterable<FieldDef<T,?>> fields) |
|
Schema(int version,
boolean release,
Iterable<FieldDef<T,?>> fields) |
Modifier and Type | Method and Description |
---|---|
Iterable<Schema.Values<T>> |
buildFields(T obj,
FieldDef.FillArgs fillArgs)
Build all fields in the schema from an input object.
|
com.google.common.collect.ImmutableMap<String,FieldDef<T,?>> |
getFields() |
int |
getVersion() |
boolean |
isRelease() |
String |
toString() |
public final boolean isRelease()
public final int getVersion()
public final Iterable<Schema.Values<T>> buildFields(T obj, FieldDef.FillArgs fillArgs)
Null values are omitted, as are fields which cause errors, which are logged.
obj
- input object.fillArgs
- arguments for filling fields.