Class ConstType._Builder

    • Constructor Detail

      • _Builder

        public _Builder()
        Make a p_model.ConstType builder instance.
      • _Builder

        public _Builder​(ConstType base)
        Make a mutating builder off a base p_model.ConstType.
        Parameters:
        base - The base ConstType
    • Method Detail

      • setDocumentation

        @Nonnull
        public ConstType._Builder setDocumentation​(java.lang.String value)
        Set the documentation field value.
        Specified by:
        setDocumentation in interface Decl._Builder
        Parameters:
        value - The new value
        Returns:
        The builder
      • isSetDocumentation

        public boolean isSetDocumentation()
        Checks for explicit presence of the documentation field.
        Returns:
        True if documentation has been set.
      • hasDocumentation

        public boolean hasDocumentation()
        Checks for presence of the documentation field.
        Specified by:
        hasDocumentation in interface Decl
        Returns:
        True if documentation is present.
      • isModifiedDocumentation

        public boolean isModifiedDocumentation()
        Checks if the documentation field has been modified since the builder was created.
        Returns:
        True if documentation has been modified.
      • 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 field 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 documentation field value
      • setType

        @Nonnull
        public ConstType._Builder setType​(java.lang.String value)
        Set the type field value.
        Parameters:
        value - The new value
        Returns:
        The builder
      • isSetType

        public boolean isSetType()
        Checks for explicit presence of the type field.
        Returns:
        True if type has been set.
      • hasType

        public boolean hasType()
        Checks for presence of the type field.
        Specified by:
        hasType in interface ConstType_OrBuilder
        Returns:
        True if type is present.
      • isModifiedType

        public boolean isModifiedType()
        Checks if the type field has been modified since the builder was created.
        Returns:
        True if type has been modified.
      • clearType

        @Nonnull
        public ConstType._Builder clearType()
        Clear the type field.
        Returns:
        The builder
      • getType

        public java.lang.String getType()
        Specified by:
        getType in interface ConstType_OrBuilder
        Returns:
        The type field value
      • setName

        @Nonnull
        public ConstType._Builder setName​(java.lang.String value)
        Set the name field value.
        Specified by:
        setName in interface Decl._Builder
        Parameters:
        value - The new value
        Returns:
        The builder
      • isSetName

        public boolean isSetName()
        Checks for explicit presence of the name field.
        Returns:
        True if name has been set.
      • hasName

        public boolean hasName()
        Checks for presence of the name field.
        Specified by:
        hasName in interface Decl
        Returns:
        True if name is present.
      • isModifiedName

        public boolean isModifiedName()
        Checks if the name field has been modified since the builder was created.
        Returns:
        True if name has been modified.
      • getName

        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 field value
      • setValue

        @Nonnull
        public ConstType._Builder setValue​(java.lang.String value)
        Set the value field value.
        Parameters:
        value - The new value
        Returns:
        The builder
      • isSetValue

        public boolean isSetValue()
        Checks for explicit presence of the value field.
        Returns:
        True if value has been set.
      • hasValue

        public boolean hasValue()
        Checks for presence of the value field.
        Specified by:
        hasValue in interface ConstType_OrBuilder
        Returns:
        True if value is present.
      • isModifiedValue

        public boolean isModifiedValue()
        Checks if the value field has been modified since the builder was created.
        Returns:
        True if value has been modified.
      • clearValue

        @Nonnull
        public ConstType._Builder clearValue()
        Clear the value field.
        Returns:
        The builder
      • getValue

        public java.lang.String getValue()
        Specified by:
        getValue in interface ConstType_OrBuilder
        Returns:
        The value field value
      • setAnnotations

        @Nonnull
        public ConstType._Builder setAnnotations​(java.util.Map<java.lang.String,​java.lang.String> value)
        Set the annotations field value.
        Parameters:
        value - The new value
        Returns:
        The builder
      • putInAnnotations

        @Nonnull
        public ConstType._Builder putInAnnotations​(java.lang.String key,
                                                   java.lang.String value)
        Adds a mapping to the annotations map.
        Parameters:
        key - The inserted key
        value - The inserted value
        Returns:
        The builder
      • isSetAnnotations

        public boolean isSetAnnotations()
        Checks for explicit presence of the annotations field.
        Returns:
        True if annotations has been set.
      • hasAnnotations

        public boolean hasAnnotations()
        Checks for presence of the annotations field.
        Specified by:
        hasAnnotations in interface ConstType_OrBuilder
        Returns:
        True if annotations is present.
      • isModifiedAnnotations

        public boolean isModifiedAnnotations()
        Checks if the annotations field has been modified since the builder was created.
        Returns:
        True if annotations has been modified.
      • clearAnnotations

        @Nonnull
        public ConstType._Builder clearAnnotations()
        Clear the annotations field.
        Returns:
        The builder
      • mutableAnnotations

        public java.util.Map<java.lang.String,​java.lang.String> mutableAnnotations()
        Returns:
        The mutable annotations container
      • getAnnotations

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

        @Nonnull
        public java.util.Optional<java.util.Map<java.lang.String,​java.lang.String>> optionalAnnotations()
        Specified by:
        optionalAnnotations in interface ConstType_OrBuilder
        Returns:
        Optional annotations field value
      • 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
      • mutator

        public net.morimekta.providence.PMessageBuilder mutator​(int key)
        Specified by:
        mutator in class net.morimekta.providence.PMessageBuilder<ConstType>
      • set

        @Nonnull
        public ConstType._Builder set​(int key,
                                      java.lang.Object value)
        Specified by:
        set in class net.morimekta.providence.PMessageBuilder<ConstType>
      • isSet

        public boolean isSet​(int key)
        Specified by:
        isSet in class net.morimekta.providence.PMessageBuilder<ConstType>
      • isModified

        public boolean isModified​(int key)
        Specified by:
        isModified in class net.morimekta.providence.PMessageBuilder<ConstType>
      • get

        public <T> T get​(int key)
        Specified by:
        get in interface net.morimekta.providence.PMessageOrBuilder<ConstType>
      • has

        public boolean has​(int key)
        Specified by:
        has in interface net.morimekta.providence.PMessageOrBuilder<ConstType>
      • addTo

        @Nonnull
        public ConstType._Builder addTo​(int key,
                                        java.lang.Object value)
        Specified by:
        addTo in class net.morimekta.providence.PMessageBuilder<ConstType>
      • clear

        @Nonnull
        public ConstType._Builder clear​(int key)
        Specified by:
        clear in class net.morimekta.providence.PMessageBuilder<ConstType>
      • valid

        public boolean valid()
        Specified by:
        valid in class net.morimekta.providence.PMessageBuilder<ConstType>
      • validate

        public ConstType._Builder validate()
        Specified by:
        validate in class net.morimekta.providence.PMessageBuilder<ConstType>
      • descriptor

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

        public void readBinary​(net.morimekta.util.io.BigEndianBinaryReader reader,
                               boolean strict)
                        throws java.io.IOException
        Specified by:
        readBinary in interface net.morimekta.providence.serializer.binary.BinaryReader
        Throws:
        java.io.IOException
      • build

        @Nonnull
        public ConstType build()
        Specified by:
        build in interface Decl._Builder
        Specified by:
        build in class net.morimekta.providence.PMessageBuilder<ConstType>
        Returns:
        The built instance