Interface PMessage<Message extends PMessage<Message>>

    • Method Detail

      • has

        default <F extends PField<Message>> boolean has​(@Nonnull
                                                        F field)
        Specified by:
        has in interface PMessageOrBuilder<Message extends PMessage<Message>>
        Type Parameters:
        F - The message field type.
        Parameters:
        field - The field.
        Returns:
        Whether the field is present.
      • get

        default <T,​F extends PField<Message>> T get​(@Nonnull
                                                          F field)
        Specified by:
        get in interface PMessageOrBuilder<Message extends PMessage<Message>>
        Type Parameters:
        T - The return type.
        F - The message field type.
        Parameters:
        field - The field.
        Returns:
        Whether the field is present.
      • mutate

        @Nonnull
        PMessageBuilder<Message> mutate()
        Get a builder that extends the current object.
        Returns:
        The builder instance.
      • mergeWith

        @Nonnull
        default Message mergeWith​(Message other)
        Shorthand for merging two messages.
        Parameters:
        other - The message to merge over this messages' values.
        Returns:
        The merged message.
      • asString

        @Nonnull
        java.lang.String asString()
        Pure string representation of content. Does not contain type info.
        Specified by:
        asString in interface net.morimekta.util.Stringable
        Returns:
        String representation.