Interface CMessage<Message extends PMessage<Message>>
-
- All Superinterfaces:
java.lang.Comparable<Message>
,PMessage<Message>
,PMessageOrBuilder<Message>
,PValue<Message>
,net.morimekta.util.Stringable
- All Known Implementing Classes:
CException
,CInterface
,CStruct
public interface CMessage<Message extends PMessage<Message>> extends PMessage<Message>
- Since:
- 26.08.15
- Author:
- Stein Eldar Johnsen
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default java.lang.String
asString()
Pure string representation of content.default int
compareTo(Message other)
default <T> T
get(int key)
default boolean
has(int key)
java.util.Map<java.lang.Integer,java.lang.Object>
values()
Method to access all values in the message.-
Methods inherited from interface net.morimekta.providence.PMessageOrBuilder
descriptor, toBuilder, toMessage
-
-
-
-
Method Detail
-
values
java.util.Map<java.lang.Integer,java.lang.Object> values()
Method to access all values in the message.- Returns:
- The values map.
-
has
default boolean has(int key)
- Specified by:
has
in interfacePMessageOrBuilder<Message extends PMessage<Message>>
- Parameters:
key
- The key of the field.- Returns:
- Whether the field is present.
-
get
default <T> T get(int key)
- Specified by:
get
in interfacePMessageOrBuilder<Message extends PMessage<Message>>
- Type Parameters:
T
- The return type.- Parameters:
key
- The key of the field.- Returns:
- The value of the field.
-
compareTo
default int compareTo(@Nonnull Message other)
-
asString
@Nonnull default java.lang.String asString()
Description copied from interface:PMessage
Pure string representation of content. Does not contain type info.
-
-