Package net.morimekta.providence.model
Class EnumValue._Builder
- java.lang.Object
-
- net.morimekta.providence.PMessageBuilder<EnumValue>
-
- net.morimekta.providence.model.EnumValue._Builder
-
- All Implemented Interfaces:
Decl,Decl._Builder,EnumValue_OrBuilder,net.morimekta.providence.PBuilder<EnumValue>,net.morimekta.providence.PMessageOrBuilder<EnumValue>,net.morimekta.providence.PValue<EnumValue>,net.morimekta.providence.serializer.binary.BinaryReader
- Enclosing class:
- EnumValue
public static class EnumValue._Builder extends net.morimekta.providence.PMessageBuilder<EnumValue> implements Decl._Builder, EnumValue_OrBuilder, net.morimekta.providence.serializer.binary.BinaryReader
<name> (= <value>)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.morimekta.providence.model.Decl
Decl._Builder, Decl._Field
-
-
Field Summary
-
Fields inherited from interface net.morimekta.providence.model.Decl
kDescriptor
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EnumValue._BuilderaddTo(int key, java.lang.Object value)EnumValuebuild()EnumValue._Builderclear(int key)EnumValue._BuilderclearAnnotations()Clear theannotationsfield.EnumValue._BuilderclearDocumentation()Clear thedocumentationfield.EnumValue._BuilderclearId()Clear theidfield.EnumValue._BuilderclearName()Clear thenamefield.net.morimekta.providence.descriptor.PStructDescriptor<EnumValue>descriptor()booleanequals(java.lang.Object o)<T> Tget(int key)java.util.Map<java.lang.String,java.lang.String>getAnnotations()java.lang.StringgetDocumentation()Documentation for the specific declaration.intgetId()java.lang.StringgetName()Name of the type, constant or service.booleanhas(int key)booleanhasAnnotations()Checks for presence of theannotationsfield.booleanhasDocumentation()Checks for presence of thedocumentationfield.inthashCode()booleanhasId()Checks for presence of theidfield.booleanhasName()Checks for presence of thenamefield.booleanisModified(int key)booleanisModifiedAnnotations()Checks if theannotationsfield has been modified since the builder was created.booleanisModifiedDocumentation()Checks if thedocumentationfield has been modified since the builder was created.booleanisModifiedId()Checks if theidfield has been modified since the builder was created.booleanisModifiedName()Checks if thenamefield has been modified since the builder was created.booleanisSet(int key)booleanisSetAnnotations()Checks for explicit presence of theannotationsfield.booleanisSetDocumentation()Checks for explicit presence of thedocumentationfield.booleanisSetId()Checks for explicit presence of theidfield.booleanisSetName()Checks for explicit presence of thenamefield.EnumValue._Buildermerge(EnumValue from)java.util.Map<java.lang.String,java.lang.String>mutableAnnotations()net.morimekta.providence.PMessageBuildermutator(int key)intnumAnnotations()java.util.Optional<java.util.Map<java.lang.String,java.lang.String>>optionalAnnotations()java.util.Optional<java.lang.String>optionalDocumentation()Documentation for the specific declaration.java.util.Optional<java.lang.Integer>optionalId()EnumValue._BuilderputInAnnotations(java.lang.String key, java.lang.String value)Adds a mapping to theannotationsmap.voidreadBinary(net.morimekta.util.io.BigEndianBinaryReader reader, boolean strict)EnumValue._Builderset(int key, java.lang.Object value)EnumValue._BuildersetAnnotations(java.util.Map<java.lang.String,java.lang.String> value)Set theannotationsfield value.EnumValue._BuildersetDocumentation(java.lang.String value)Set thedocumentationfield value.EnumValue._BuildersetId(int value)Set theidfield value.EnumValue._BuildersetId(java.lang.Integer value)Set theidfield value.EnumValue._BuildersetName(java.lang.String value)Set thenamefield value.booleanvalid()EnumValue._Buildervalidate()-
Methods inherited from class net.morimekta.providence.PMessageBuilder
addTo, clear, isModified, isSet, modifiedFields, mutator, presentFields, set
-
-
-
-
Constructor Detail
-
_Builder
public _Builder()
Make a p_model.EnumValue builder instance.
-
_Builder
public _Builder(EnumValue base)
Make a mutating builder off a base p_model.EnumValue.- Parameters:
base- The base EnumValue
-
-
Method Detail
-
merge
@Nonnull public EnumValue._Builder merge(EnumValue from)
- Specified by:
mergein classnet.morimekta.providence.PMessageBuilder<EnumValue>
-
setDocumentation
@Nonnull public EnumValue._Builder setDocumentation(java.lang.String value)
Set thedocumentationfield value.- Specified by:
setDocumentationin interfaceDecl._Builder- Parameters:
value- The new value- Returns:
- The builder
-
isSetDocumentation
public boolean isSetDocumentation()
Checks for explicit presence of thedocumentationfield.- Returns:
- True if documentation has been set.
-
hasDocumentation
public boolean hasDocumentation()
Checks for presence of thedocumentationfield.- Specified by:
hasDocumentationin interfaceDecl- Returns:
- True if documentation is present.
-
isModifiedDocumentation
public boolean isModifiedDocumentation()
Checks if thedocumentationfield has been modified since the builder was created.- Returns:
- True if documentation has been modified.
-
clearDocumentation
@Nonnull public EnumValue._Builder clearDocumentation()
Clear thedocumentationfield.- Specified by:
clearDocumentationin interfaceDecl._Builder- Returns:
- The builder
-
getDocumentation
public java.lang.String getDocumentation()
Description copied from interface:DeclDocumentation for the specific declaration.- Specified by:
getDocumentationin interfaceDecl- Returns:
- The
documentationfield value
-
optionalDocumentation
@Nonnull public java.util.Optional<java.lang.String> optionalDocumentation()
Description copied from interface:DeclDocumentation for the specific declaration.- Specified by:
optionalDocumentationin interfaceDecl- Returns:
- Optional
documentationfield value
-
setName
@Nonnull public EnumValue._Builder setName(java.lang.String value)
Set thenamefield value.- Specified by:
setNamein interfaceDecl._Builder- Parameters:
value- The new value- Returns:
- The builder
-
isSetName
public boolean isSetName()
Checks for explicit presence of thenamefield.- Returns:
- True if name has been set.
-
hasName
public boolean hasName()
Checks for presence of thenamefield.
-
isModifiedName
public boolean isModifiedName()
Checks if thenamefield has been modified since the builder was created.- Returns:
- True if name has been modified.
-
clearName
@Nonnull public EnumValue._Builder clearName()
Clear thenamefield.- Specified by:
clearNamein interfaceDecl._Builder- Returns:
- The builder
-
getName
public java.lang.String getName()
Description copied from interface:DeclName of the type, constant or service.
-
setId
@Nonnull public EnumValue._Builder setId(java.lang.Integer value)
Set theidfield value.- Parameters:
value- The new value- Returns:
- The builder
-
setId
@Nonnull public EnumValue._Builder setId(int value)
Set theidfield value.- Parameters:
value- The new value- Returns:
- The builder
-
isSetId
public boolean isSetId()
Checks for explicit presence of theidfield.- Returns:
- True if id has been set.
-
hasId
public boolean hasId()
Checks for presence of theidfield.- Specified by:
hasIdin interfaceEnumValue_OrBuilder- Returns:
- True if id is present.
-
isModifiedId
public boolean isModifiedId()
Checks if theidfield has been modified since the builder was created.- Returns:
- True if id has been modified.
-
clearId
@Nonnull public EnumValue._Builder clearId()
Clear theidfield.- Returns:
- The builder
-
getId
public int getId()
- Specified by:
getIdin interfaceEnumValue_OrBuilder- Returns:
- The
idfield value
-
optionalId
@Nonnull public java.util.Optional<java.lang.Integer> optionalId()
- Specified by:
optionalIdin interfaceEnumValue_OrBuilder- Returns:
- Optional
idfield value
-
setAnnotations
@Nonnull public EnumValue._Builder setAnnotations(java.util.Map<java.lang.String,java.lang.String> value)
Set theannotationsfield value.- Parameters:
value- The new value- Returns:
- The builder
-
putInAnnotations
@Nonnull public EnumValue._Builder putInAnnotations(java.lang.String key, java.lang.String value)
Adds a mapping to theannotationsmap.- Parameters:
key- The inserted keyvalue- The inserted value- Returns:
- The builder
-
isSetAnnotations
public boolean isSetAnnotations()
Checks for explicit presence of theannotationsfield.- Returns:
- True if annotations has been set.
-
hasAnnotations
public boolean hasAnnotations()
Checks for presence of theannotationsfield.- Specified by:
hasAnnotationsin interfaceEnumValue_OrBuilder- Returns:
- True if annotations is present.
-
isModifiedAnnotations
public boolean isModifiedAnnotations()
Checks if theannotationsfield has been modified since the builder was created.- Returns:
- True if annotations has been modified.
-
clearAnnotations
@Nonnull public EnumValue._Builder clearAnnotations()
Clear theannotationsfield.- Returns:
- The builder
-
mutableAnnotations
public java.util.Map<java.lang.String,java.lang.String> mutableAnnotations()
- Returns:
- The mutable
annotationscontainer
-
getAnnotations
public java.util.Map<java.lang.String,java.lang.String> getAnnotations()
- Specified by:
getAnnotationsin interfaceEnumValue_OrBuilder- Returns:
- The
annotationsfield value
-
optionalAnnotations
@Nonnull public java.util.Optional<java.util.Map<java.lang.String,java.lang.String>> optionalAnnotations()
- Specified by:
optionalAnnotationsin interfaceEnumValue_OrBuilder- Returns:
- Optional
annotationsfield value
-
numAnnotations
public int numAnnotations()
- Specified by:
numAnnotationsin interfaceEnumValue_OrBuilder- Returns:
- Number of entries in
annotations.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
mutator
public net.morimekta.providence.PMessageBuilder mutator(int key)
- Specified by:
mutatorin classnet.morimekta.providence.PMessageBuilder<EnumValue>
-
set
@Nonnull public EnumValue._Builder set(int key, java.lang.Object value)
- Specified by:
setin classnet.morimekta.providence.PMessageBuilder<EnumValue>
-
isSet
public boolean isSet(int key)
- Specified by:
isSetin classnet.morimekta.providence.PMessageBuilder<EnumValue>
-
isModified
public boolean isModified(int key)
- Specified by:
isModifiedin classnet.morimekta.providence.PMessageBuilder<EnumValue>
-
get
public <T> T get(int key)
- Specified by:
getin interfacenet.morimekta.providence.PMessageOrBuilder<EnumValue>
-
has
public boolean has(int key)
- Specified by:
hasin interfacenet.morimekta.providence.PMessageOrBuilder<EnumValue>
-
addTo
@Nonnull public EnumValue._Builder addTo(int key, java.lang.Object value)
- Specified by:
addToin classnet.morimekta.providence.PMessageBuilder<EnumValue>
-
clear
@Nonnull public EnumValue._Builder clear(int key)
- Specified by:
clearin classnet.morimekta.providence.PMessageBuilder<EnumValue>
-
valid
public boolean valid()
- Specified by:
validin classnet.morimekta.providence.PMessageBuilder<EnumValue>
-
validate
public EnumValue._Builder validate()
- Specified by:
validatein classnet.morimekta.providence.PMessageBuilder<EnumValue>
-
descriptor
@Nonnull public net.morimekta.providence.descriptor.PStructDescriptor<EnumValue> descriptor()
-
readBinary
public void readBinary(net.morimekta.util.io.BigEndianBinaryReader reader, boolean strict) throws java.io.IOException- Specified by:
readBinaryin interfacenet.morimekta.providence.serializer.binary.BinaryReader- Throws:
java.io.IOException
-
build
@Nonnull public EnumValue build()
- Specified by:
buildin interfaceDecl._Builder- Specified by:
buildin interfacenet.morimekta.providence.PBuilder<EnumValue>- Returns:
- The built instance
-
-