public static class Empty._Builder extends PMessageBuilder<Empty,Empty._Field> implements BinaryReader
Constructor and Description |
---|
_Builder()
Make a putil.Empty builder instance.
|
_Builder(Empty base)
Make a mutating builder off a base putil.Empty.
|
Modifier and Type | Method and Description |
---|---|
Empty._Builder |
addTo(int key,
Object value)
Adds a value to a set or list container.
|
Empty |
build()
Build the instance value.
|
Empty._Builder |
clear(int key)
Clear the provided field value.
|
PStructDescriptor<Empty,Empty._Field> |
descriptor()
Get the descriptor for the message being built.
|
boolean |
equals(Object o) |
int |
hashCode() |
boolean |
isModified(int key)
Checks if a specific field is modified on the builder.
|
boolean |
isSet(int key)
Checks if a specific field is set on the builder.
|
Empty._Builder |
merge(Empty from)
Merges the provided message into the builder.
|
PMessageBuilder |
mutator(int key)
Get the builder for the given message contained in this builder.
|
void |
readBinary(net.morimekta.util.io.BigEndianBinaryReader reader,
boolean strict)
Read the binary content into the current builder.
|
Empty._Builder |
set(int key,
Object value)
Set the provided field value.
|
boolean |
valid()
Checks if the current set data is enough to make a valid struct.
|
void |
validate()
Checks if the current set data is enough to make a valid struct.
|
addTo, clear, isModified, isSet, modifiedFields, mutator, presentFields, set
public _Builder()
public _Builder(Empty base)
base
- The base Empty@Nonnull public Empty._Builder merge(Empty from)
PMessageBuilder
merge
in class PMessageBuilder<Empty,Empty._Field>
from
- The message to merge values from.public PMessageBuilder mutator(int key)
PMessageBuilder
mutator
in class PMessageBuilder<Empty,Empty._Field>
key
- The field key.@Nonnull public Empty._Builder set(int key, Object value)
PMessageBuilder
set
in class PMessageBuilder<Empty,Empty._Field>
key
- The key of the field to set.value
- The value to be set.public boolean isSet(int key)
PMessageBuilder
isSet
in class PMessageBuilder<Empty,Empty._Field>
key
- The key of the field to check.public boolean isModified(int key)
PMessageBuilder
isModified
in class PMessageBuilder<Empty,Empty._Field>
key
- The key of the field to check.public Empty._Builder addTo(int key, Object value)
PMessageBuilder
addTo
in class PMessageBuilder<Empty,Empty._Field>
key
- The key of the container field to add too.value
- The value to add.@Nonnull public Empty._Builder clear(int key)
PMessageBuilder
clear
in class PMessageBuilder<Empty,Empty._Field>
key
- The key of the field to clear.public boolean valid()
PMessageBuilder
valid
in class PMessageBuilder<Empty,Empty._Field>
public void validate()
PMessageBuilder
IllegalStateException
with an appropriate error
message.validate
in class PMessageBuilder<Empty,Empty._Field>
@Nonnull public PStructDescriptor<Empty,Empty._Field> descriptor()
PMessageBuilder
descriptor
in class PMessageBuilder<Empty,Empty._Field>
public void readBinary(net.morimekta.util.io.BigEndianBinaryReader reader, boolean strict) throws IOException
BinaryReader
BinarySerializer.deserialize(InputStream, PMessageDescriptor)
call.readBinary
in interface BinaryReader
reader
- The reader to read from.strict
- If content should be handled strictly. True means to fail
on everything that Apache thrift failed read() on.IOException
- When unable to read message for any reason.Copyright © 2015–2018 morimekta.net. All rights reserved.