public interface PMessage<Message extends PMessage<Message,Field>,Field extends PField> extends PValue<Message>, net.morimekta.util.Stringable
Modifier and Type | Method and Description |
---|---|
String |
asString()
Pure string representation of content.
|
PMessageDescriptor<Message,Field> |
descriptor() |
default <T> T |
get(Field field) |
<T> T |
get(int key) |
default boolean |
has(Field field) |
boolean |
has(int key) |
default Message |
mergeWith(Message other)
Shorthand for merging two messages.
|
PMessageBuilder<Message,Field> |
mutate()
Get a builder that extends the current object.
|
compareTo
boolean has(int key)
key
- The key of the field.default boolean has(@Nonnull Field field)
field
- The field.<T> T get(int key)
T
- The return type.key
- The key of the field.default <T> T get(@Nonnull Field field)
T
- The return type.field
- The field.@Nonnull PMessageBuilder<Message,Field> mutate()
@Nonnull default Message mergeWith(Message other)
other
- The message to merge over this messages' values.@Nonnull String asString()
asString
in interface net.morimekta.util.Stringable
@Nonnull PMessageDescriptor<Message,Field> descriptor()
Copyright © 2015–2018 morimekta.net. All rights reserved.