Constructor and Description |
---|
PMessageBuilder() |
Modifier and Type | Method and Description |
---|---|
abstract PMessageBuilder<T,F> |
addTo(int key,
Object value)
Adds a value to a set or list container.
|
abstract PMessageBuilder<T,F> |
clear(int key)
clear the provided field value.
|
abstract PStructDescriptor<T,F> |
descriptor()
Get the descriptor for the message being built.
|
abstract boolean |
isValid()
Checks if the current set data is enough to make a valid struct.
|
abstract PMessageBuilder<T,F> |
merge(T from)
Merges the provided message into the builder.
|
abstract PMessageBuilder |
mutator(int key)
Get the builder for the given message contained in this builder.
|
abstract PMessageBuilder<T,F> |
set(int key,
Object value)
Set the provided field value.
|
abstract void |
validate()
Checks if the current set data is enough to make a valid struct.
|
public abstract boolean isValid()
public abstract void validate() throws IllegalStateException
IllegalStateException
with an appropriate error
message.IllegalStateException
- When the builder will not generate a
valid message model object.public abstract PMessageBuilder<T,F> set(int key, Object value)
key
- The field key.value
- The field value.public abstract PMessageBuilder<T,F> addTo(int key, Object value)
key
- The field key.value
- The field value to add.IllegalArgumentException
- if the field is not a list or set.public abstract PMessageBuilder<T,F> clear(int key)
key
- The field key.public abstract PMessageBuilder<T,F> merge(T from)
from
- The message to merge values from.public abstract PMessageBuilder mutator(int key)
key
- The field key.public abstract PStructDescriptor<T,F> descriptor()
Copyright © 2015–2016 morimekta.net. All rights reserved.