Class EnumType

    • Method Detail

      • hasDocumentation

        public boolean hasDocumentation()
        Specified by:
        hasDocumentation in interface Decl
        Returns:
        If documentation is present.
      • getDocumentation

        public java.lang.String getDocumentation()
        Description copied from interface: Decl
        Documentation for the specific declaration.
        Specified by:
        getDocumentation in interface Decl
        Returns:
        The documentation value
      • optionalDocumentation

        @Nonnull
        public java.util.Optional<java.lang.String> optionalDocumentation()
        Description copied from interface: Decl
        Documentation for the specific declaration.
        Specified by:
        optionalDocumentation in interface Decl
        Returns:
        Optional of the documentation field value.
      • hasName

        public boolean hasName()
        Specified by:
        hasName in interface Decl
        Returns:
        If name is present.
      • getName

        @Nonnull
        public java.lang.String getName()
        Description copied from interface: Decl
        Name of the type, constant or service.
        Specified by:
        getName in interface Decl
        Returns:
        The name value
      • getAnnotations

        public java.util.Map<java.lang.String,​java.lang.String> getAnnotations()
        Specified by:
        getAnnotations in interface EnumType_OrBuilder
        Returns:
        The annotations value
      • optionalAnnotations

        @Nonnull
        public java.util.Optional<java.util.Map<java.lang.String,​java.lang.String>> optionalAnnotations()
        Specified by:
        optionalAnnotations in interface EnumType_OrBuilder
        Returns:
        Optional of the annotations field value.
      • has

        public boolean has​(int key)
        Specified by:
        has in interface PMessageOrBuilder<EnumType>
        Parameters:
        key - The key of the field.
        Returns:
        Whether the field is present.
      • get

        public <T> T get​(int key)
        Specified by:
        get in interface PMessageOrBuilder<EnumType>
        Type Parameters:
        T - The return type.
        Parameters:
        key - The key of the field.
        Returns:
        The value of the field.
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • asString

        @Nonnull
        public java.lang.String asString()
        Description copied from interface: PMessage
        Pure string representation of content. Does not contain type info.
        Specified by:
        asString in interface PMessage<EnumType>
        Specified by:
        asString in interface net.morimekta.util.Stringable
        Returns:
        String representation.
      • compareTo

        public int compareTo​(EnumType other)
        Specified by:
        compareTo in interface java.lang.Comparable<EnumType>
      • writeBinary

        public int writeBinary​(net.morimekta.util.io.BigEndianBinaryWriter writer)
                        throws java.io.IOException
        Description copied from interface: BinaryWriter
        Write the current message to the binary writer. NOTE: This method is not intended to be used directly. Instead use the BinarySerializer.serialize(OutputStream, PMessageOrBuilder) call.
        Specified by:
        writeBinary in interface BinaryWriter
        Parameters:
        writer - The binary writer to write to.
        Returns:
        The number of bytes written.
        Throws:
        java.io.IOException - If it failed to write the message for any reason.
      • builder

        public static EnumType._Builder builder()
        Make a p_model.EnumType builder.
        Returns:
        The builder instance.