Class EnumType

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<EnumType>, Decl, EnumType_OrBuilder, net.morimekta.providence.PMessage<EnumType>, net.morimekta.providence.PMessageOrBuilder<EnumType>, net.morimekta.providence.PValue<EnumType>, net.morimekta.providence.serializer.binary.BinaryWriter, net.morimekta.util.Stringable

    @Generated(value="net.morimekta.providence:providence-generator-java",
               comments="java:serializable")
    @Immutable
    public class EnumType
    extends java.lang.Object
    implements Decl, EnumType_OrBuilder, net.morimekta.providence.PMessage<EnumType>, java.lang.Comparable<EnumType>, java.io.Serializable, net.morimekta.providence.serializer.binary.BinaryWriter
    enum { (<value> ([;,])?)* }
    See Also:
    Serialized Form
    • Field Detail

      • kDescriptor

        public static final net.morimekta.providence.descriptor.PStructDescriptor<EnumType> kDescriptor
    • 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 net.morimekta.providence.PMessageOrBuilder<EnumType>
      • get

        public <T> T get​(int key)
        Specified by:
        get in interface net.morimekta.providence.PMessageOrBuilder<EnumType>
      • 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()
        Specified by:
        asString in interface net.morimekta.providence.PMessage<EnumType>
        Specified by:
        asString in interface net.morimekta.util.Stringable
      • 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
        Specified by:
        writeBinary in interface net.morimekta.providence.serializer.binary.BinaryWriter
        Throws:
        java.io.IOException
      • mutate

        @Nonnull
        public EnumType._Builder mutate()
        Specified by:
        mutate in interface net.morimekta.providence.PMessage<EnumType>
      • provider

        @Nonnull
        public static net.morimekta.providence.descriptor.PStructDescriptorProvider<EnumType> provider()
      • descriptor

        @Nonnull
        public net.morimekta.providence.descriptor.PStructDescriptor<EnumType> descriptor()
        Specified by:
        descriptor in interface net.morimekta.providence.PMessageOrBuilder<EnumType>
        Specified by:
        descriptor in interface net.morimekta.providence.PValue<EnumType>
      • builder

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