Class Property_Builder
- java.lang.Object
-
- org.inferred.freebuilder.processor.property.Property_Builder
-
- Direct Known Subclasses:
Property.Builder
@Generated("org.inferred.freebuilder.processor.Processor") abstract class Property_Builder extends java.lang.ObjectAuto-generated superclass ofProperty.Builder, derived from the API ofProperty_Builder.Property.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classProperty_Builder.Partialprivate static classProperty_Builder.Propertyprivate static classProperty_Builder.Rebuildableprivate static classProperty_Builder.Value
-
Field Summary
Fields Modifier and Type Field Description private java.util.EnumSet<Property_Builder.Property>_unsetPropertiesprivate java.util.List<Excerpt>accessorAnnotationsprivate java.lang.StringallCapsNameprivate javax.lang.model.type.TypeMirrorboxedTypeprivate java.lang.StringcapitalizedNameprivate booleanfullyCheckedCastprivate java.util.List<Excerpt>getterAnnotationsprivate java.lang.StringgetterNameprivate booleaninEqualsAndHashCodeprivate booleaninToStringprivate java.lang.Stringnameprivate java.util.List<Excerpt>putAnnotationsprivate javax.lang.model.type.TypeMirrortypeprivate booleanusingBeanConvention
-
Constructor Summary
Constructors Constructor Description Property_Builder()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Property.BuilderaddAccessorAnnotations(Excerpt element)Addselementto the list to be returned fromProperty.getAccessorAnnotations().Property.BuilderaddAccessorAnnotations(Excerpt... elements)Adds each element ofelementsto the list to be returned fromProperty.getAccessorAnnotations().Property.BuilderaddAllAccessorAnnotations(java.lang.Iterable<? extends Excerpt> elements)Adds each element ofelementsto the list to be returned fromProperty.getAccessorAnnotations().Property.BuilderaddAllAccessorAnnotations(java.util.Spliterator<? extends Excerpt> elements)Adds each element ofelementsto the list to be returned fromProperty.getAccessorAnnotations().Property.BuilderaddAllAccessorAnnotations(java.util.stream.BaseStream<? extends Excerpt,?> elements)Adds each element ofelementsto the list to be returned fromProperty.getAccessorAnnotations().Property.BuilderaddAllGetterAnnotations(java.lang.Iterable<? extends Excerpt> elements)Adds each element ofelementsto the list to be returned fromProperty.getGetterAnnotations().Property.BuilderaddAllGetterAnnotations(java.util.Spliterator<? extends Excerpt> elements)Adds each element ofelementsto the list to be returned fromProperty.getGetterAnnotations().Property.BuilderaddAllGetterAnnotations(java.util.stream.BaseStream<? extends Excerpt,?> elements)Adds each element ofelementsto the list to be returned fromProperty.getGetterAnnotations().Property.BuilderaddAllPutAnnotations(java.lang.Iterable<? extends Excerpt> elements)Adds each element ofelementsto the list to be returned fromProperty.getPutAnnotations().Property.BuilderaddAllPutAnnotations(java.util.Spliterator<? extends Excerpt> elements)Adds each element ofelementsto the list to be returned fromProperty.getPutAnnotations().Property.BuilderaddAllPutAnnotations(java.util.stream.BaseStream<? extends Excerpt,?> elements)Adds each element ofelementsto the list to be returned fromProperty.getPutAnnotations().Property.BuilderaddGetterAnnotations(Excerpt element)Addselementto the list to be returned fromProperty.getGetterAnnotations().Property.BuilderaddGetterAnnotations(Excerpt... elements)Adds each element ofelementsto the list to be returned fromProperty.getGetterAnnotations().Property.BuilderaddPutAnnotations(Excerpt element)Addselementto the list to be returned fromProperty.getPutAnnotations().Property.BuilderaddPutAnnotations(Excerpt... elements)Adds each element ofelementsto the list to be returned fromProperty.getPutAnnotations().Propertybuild()Returns a newly-createdPropertybased on the contents of thisBuilder.PropertybuildPartial()Returns a newly-created partialPropertyfor use in unit tests.Property.Builderclear()Resets the state of this builder.Property.BuilderclearAccessorAnnotations()Clears the list to be returned fromProperty.getAccessorAnnotations().Property.BuilderclearBoxedType()Sets the value to be returned byProperty.getBoxedType()toOptional.empty().Property.BuilderclearGetterAnnotations()Clears the list to be returned fromProperty.getGetterAnnotations().Property.BuilderclearPutAnnotations()Clears the list to be returned fromProperty.getPutAnnotations().static Property.Builderfrom(Property value)Creates a new builder usingvalueas a template.java.util.List<Excerpt>getAccessorAnnotations()Returns an unmodifiable view of the list that will be returned byProperty.getAccessorAnnotations().java.lang.StringgetAllCapsName()Returns the value that will be returned byProperty.getAllCapsName().java.util.Optional<javax.lang.model.type.TypeMirror>getBoxedType()Returns the value that will be returned byProperty.getBoxedType().java.lang.StringgetCapitalizedName()Returns the value that will be returned byProperty.getCapitalizedName().java.util.List<Excerpt>getGetterAnnotations()Returns an unmodifiable view of the list that will be returned byProperty.getGetterAnnotations().java.lang.StringgetGetterName()Returns the value that will be returned byProperty.getGetterName().java.lang.StringgetName()Returns the value that will be returned byProperty.getName().java.util.List<Excerpt>getPutAnnotations()Returns an unmodifiable view of the list that will be returned byProperty.getPutAnnotations().javax.lang.model.type.TypeMirrorgetType()Returns the value that will be returned byProperty.getType().booleanisFullyCheckedCast()Returns the value that will be returned byProperty.isFullyCheckedCast().booleanisInEqualsAndHashCode()Returns the value that will be returned byProperty.isInEqualsAndHashCode().booleanisInToString()Returns the value that will be returned byProperty.isInToString().booleanisUsingBeanConvention()Returns the value that will be returned byProperty.isUsingBeanConvention().Property.BuildermapAllCapsName(java.util.function.UnaryOperator<java.lang.String> mapper)Replaces the value to be returned byProperty.getAllCapsName()by applyingmapperto it and using the result.Property.BuildermapBoxedType(java.util.function.UnaryOperator<javax.lang.model.type.TypeMirror> mapper)If the value to be returned byProperty.getBoxedType()is present, replaces it by applyingmapperto it and using the result.Property.BuildermapCapitalizedName(java.util.function.UnaryOperator<java.lang.String> mapper)Replaces the value to be returned byProperty.getCapitalizedName()by applyingmapperto it and using the result.Property.BuildermapFullyCheckedCast(java.util.function.UnaryOperator<java.lang.Boolean> mapper)Replaces the value to be returned byProperty.isFullyCheckedCast()by applyingmapperto it and using the result.Property.BuildermapGetterName(java.util.function.UnaryOperator<java.lang.String> mapper)Replaces the value to be returned byProperty.getGetterName()by applyingmapperto it and using the result.Property.BuildermapInEqualsAndHashCode(java.util.function.UnaryOperator<java.lang.Boolean> mapper)Replaces the value to be returned byProperty.isInEqualsAndHashCode()by applyingmapperto it and using the result.Property.BuildermapInToString(java.util.function.UnaryOperator<java.lang.Boolean> mapper)Replaces the value to be returned byProperty.isInToString()by applyingmapperto it and using the result.Property.BuildermapName(java.util.function.UnaryOperator<java.lang.String> mapper)Replaces the value to be returned byProperty.getName()by applyingmapperto it and using the result.Property.BuildermapType(java.util.function.UnaryOperator<javax.lang.model.type.TypeMirror> mapper)Replaces the value to be returned byProperty.getType()by applyingmapperto it and using the result.Property.BuildermapUsingBeanConvention(java.util.function.UnaryOperator<java.lang.Boolean> mapper)Replaces the value to be returned byProperty.isUsingBeanConvention()by applyingmapperto it and using the result.Property.BuildermergeFrom(Property value)Copies values fromvalue, appending to collections, and skipping defaults and empty optionals.Property.BuildermergeFrom(Property.Builder template)Copies values fromtemplate, appending to collections, and skipping defaults, empty optionals and unset properties.Property.BuildermutateAccessorAnnotations(java.util.function.Consumer<? super java.util.List<Excerpt>> mutator)Appliesmutatorto the list to be returned fromProperty.getAccessorAnnotations().Property.BuildermutateGetterAnnotations(java.util.function.Consumer<? super java.util.List<Excerpt>> mutator)Appliesmutatorto the list to be returned fromProperty.getGetterAnnotations().Property.BuildermutatePutAnnotations(java.util.function.Consumer<? super java.util.List<Excerpt>> mutator)Appliesmutatorto the list to be returned fromProperty.getPutAnnotations().Property.BuildersetAllCapsName(java.lang.String allCapsName)Sets the value to be returned byProperty.getAllCapsName().Property.BuildersetBoxedType(java.util.Optional<? extends javax.lang.model.type.TypeMirror> boxedType)Sets the value to be returned byProperty.getBoxedType().Property.BuildersetBoxedType(javax.lang.model.type.TypeMirror boxedType)Sets the value to be returned byProperty.getBoxedType().Property.BuildersetCapitalizedName(java.lang.String capitalizedName)Sets the value to be returned byProperty.getCapitalizedName().Property.BuildersetFullyCheckedCast(boolean fullyCheckedCast)Sets the value to be returned byProperty.isFullyCheckedCast().Property.BuildersetGetterName(java.lang.String getterName)Sets the value to be returned byProperty.getGetterName().Property.BuildersetInEqualsAndHashCode(boolean inEqualsAndHashCode)Sets the value to be returned byProperty.isInEqualsAndHashCode().Property.BuildersetInToString(boolean inToString)Sets the value to be returned byProperty.isInToString().Property.BuildersetName(java.lang.String name)Sets the value to be returned byProperty.getName().Property.BuildersetNullableBoxedType(javax.lang.model.type.TypeMirror boxedType)Sets the value to be returned byProperty.getBoxedType().Property.BuildersetType(javax.lang.model.type.TypeMirror type)Sets the value to be returned byProperty.getType().Property.BuildersetUsingBeanConvention(boolean usingBeanConvention)Sets the value to be returned byProperty.isUsingBeanConvention().
-
-
-
Field Detail
-
type
private javax.lang.model.type.TypeMirror type
-
boxedType
private javax.lang.model.type.TypeMirror boxedType
-
name
private java.lang.String name
-
capitalizedName
private java.lang.String capitalizedName
-
allCapsName
private java.lang.String allCapsName
-
usingBeanConvention
private boolean usingBeanConvention
-
inToString
private boolean inToString
-
inEqualsAndHashCode
private boolean inEqualsAndHashCode
-
getterName
private java.lang.String getterName
-
fullyCheckedCast
private boolean fullyCheckedCast
-
accessorAnnotations
private java.util.List<Excerpt> accessorAnnotations
-
getterAnnotations
private java.util.List<Excerpt> getterAnnotations
-
putAnnotations
private java.util.List<Excerpt> putAnnotations
-
_unsetProperties
private final java.util.EnumSet<Property_Builder.Property> _unsetProperties
-
-
Method Detail
-
from
public static Property.Builder from(Property value)
Creates a new builder usingvalueas a template.If
valueis a partial, the builder will return more partials.
-
setType
public Property.Builder setType(javax.lang.model.type.TypeMirror type)
Sets the value to be returned byProperty.getType().- Returns:
- this
Builderobject - Throws:
java.lang.NullPointerException- iftypeis null
-
mapType
public Property.Builder mapType(java.util.function.UnaryOperator<javax.lang.model.type.TypeMirror> mapper)
Replaces the value to be returned byProperty.getType()by applyingmapperto it and using the result.- Returns:
- this
Builderobject - Throws:
java.lang.NullPointerException- ifmapperis null or returns nulljava.lang.IllegalStateException- if the field has not been set
-
getType
public javax.lang.model.type.TypeMirror getType()
Returns the value that will be returned byProperty.getType().- Throws:
java.lang.IllegalStateException- if the field has not been set
-
setBoxedType
public Property.Builder setBoxedType(javax.lang.model.type.TypeMirror boxedType)
Sets the value to be returned byProperty.getBoxedType().- Returns:
- this
Builderobject - Throws:
java.lang.NullPointerException- ifboxedTypeis null
-
setBoxedType
public Property.Builder setBoxedType(java.util.Optional<? extends javax.lang.model.type.TypeMirror> boxedType)
Sets the value to be returned byProperty.getBoxedType().- Returns:
- this
Builderobject
-
setNullableBoxedType
public Property.Builder setNullableBoxedType(javax.lang.model.type.TypeMirror boxedType)
Sets the value to be returned byProperty.getBoxedType().- Returns:
- this
Builderobject
-
mapBoxedType
public Property.Builder mapBoxedType(java.util.function.UnaryOperator<javax.lang.model.type.TypeMirror> mapper)
If the value to be returned byProperty.getBoxedType()is present, replaces it by applyingmapperto it and using the result.If the result is null, clears the value.
- Returns:
- this
Builderobject - Throws:
java.lang.NullPointerException- ifmapperis null
-
clearBoxedType
public Property.Builder clearBoxedType()
Sets the value to be returned byProperty.getBoxedType()toOptional.empty().- Returns:
- this
Builderobject
-
getBoxedType
public java.util.Optional<javax.lang.model.type.TypeMirror> getBoxedType()
Returns the value that will be returned byProperty.getBoxedType().
-
setName
public Property.Builder setName(java.lang.String name)
Sets the value to be returned byProperty.getName().- Returns:
- this
Builderobject - Throws:
java.lang.NullPointerException- ifnameis null
-
mapName
public Property.Builder mapName(java.util.function.UnaryOperator<java.lang.String> mapper)
Replaces the value to be returned byProperty.getName()by applyingmapperto it and using the result.- Returns:
- this
Builderobject - Throws:
java.lang.NullPointerException- ifmapperis null or returns nulljava.lang.IllegalStateException- if the field has not been set
-
getName
public java.lang.String getName()
Returns the value that will be returned byProperty.getName().- Throws:
java.lang.IllegalStateException- if the field has not been set
-
setCapitalizedName
public Property.Builder setCapitalizedName(java.lang.String capitalizedName)
Sets the value to be returned byProperty.getCapitalizedName().- Returns:
- this
Builderobject - Throws:
java.lang.NullPointerException- ifcapitalizedNameis null
-
mapCapitalizedName
public Property.Builder mapCapitalizedName(java.util.function.UnaryOperator<java.lang.String> mapper)
Replaces the value to be returned byProperty.getCapitalizedName()by applyingmapperto it and using the result.- Returns:
- this
Builderobject - Throws:
java.lang.NullPointerException- ifmapperis null or returns nulljava.lang.IllegalStateException- if the field has not been set
-
getCapitalizedName
public java.lang.String getCapitalizedName()
Returns the value that will be returned byProperty.getCapitalizedName().- Throws:
java.lang.IllegalStateException- if the field has not been set
-
setAllCapsName
public Property.Builder setAllCapsName(java.lang.String allCapsName)
Sets the value to be returned byProperty.getAllCapsName().- Returns:
- this
Builderobject - Throws:
java.lang.NullPointerException- ifallCapsNameis null
-
mapAllCapsName
public Property.Builder mapAllCapsName(java.util.function.UnaryOperator<java.lang.String> mapper)
Replaces the value to be returned byProperty.getAllCapsName()by applyingmapperto it and using the result.- Returns:
- this
Builderobject - Throws:
java.lang.NullPointerException- ifmapperis null or returns nulljava.lang.IllegalStateException- if the field has not been set
-
getAllCapsName
public java.lang.String getAllCapsName()
Returns the value that will be returned byProperty.getAllCapsName().- Throws:
java.lang.IllegalStateException- if the field has not been set
-
setUsingBeanConvention
public Property.Builder setUsingBeanConvention(boolean usingBeanConvention)
Sets the value to be returned byProperty.isUsingBeanConvention().- Returns:
- this
Builderobject
-
mapUsingBeanConvention
public Property.Builder mapUsingBeanConvention(java.util.function.UnaryOperator<java.lang.Boolean> mapper)
Replaces the value to be returned byProperty.isUsingBeanConvention()by applyingmapperto it and using the result.- Returns:
- this
Builderobject - Throws:
java.lang.NullPointerException- ifmapperis null or returns nulljava.lang.IllegalStateException- if the field has not been set
-
isUsingBeanConvention
public boolean isUsingBeanConvention()
Returns the value that will be returned byProperty.isUsingBeanConvention().- Throws:
java.lang.IllegalStateException- if the field has not been set
-
setInToString
public Property.Builder setInToString(boolean inToString)
Sets the value to be returned byProperty.isInToString().- Returns:
- this
Builderobject
-
mapInToString
public Property.Builder mapInToString(java.util.function.UnaryOperator<java.lang.Boolean> mapper)
Replaces the value to be returned byProperty.isInToString()by applyingmapperto it and using the result.- Returns:
- this
Builderobject - Throws:
java.lang.NullPointerException- ifmapperis null or returns null
-
isInToString
public boolean isInToString()
Returns the value that will be returned byProperty.isInToString().
-
setInEqualsAndHashCode
public Property.Builder setInEqualsAndHashCode(boolean inEqualsAndHashCode)
Sets the value to be returned byProperty.isInEqualsAndHashCode().- Returns:
- this
Builderobject
-
mapInEqualsAndHashCode
public Property.Builder mapInEqualsAndHashCode(java.util.function.UnaryOperator<java.lang.Boolean> mapper)
Replaces the value to be returned byProperty.isInEqualsAndHashCode()by applyingmapperto it and using the result.- Returns:
- this
Builderobject - Throws:
java.lang.NullPointerException- ifmapperis null or returns null
-
isInEqualsAndHashCode
public boolean isInEqualsAndHashCode()
Returns the value that will be returned byProperty.isInEqualsAndHashCode().
-
setGetterName
public Property.Builder setGetterName(java.lang.String getterName)
Sets the value to be returned byProperty.getGetterName().- Returns:
- this
Builderobject - Throws:
java.lang.NullPointerException- ifgetterNameis null
-
mapGetterName
public Property.Builder mapGetterName(java.util.function.UnaryOperator<java.lang.String> mapper)
Replaces the value to be returned byProperty.getGetterName()by applyingmapperto it and using the result.- Returns:
- this
Builderobject - Throws:
java.lang.NullPointerException- ifmapperis null or returns nulljava.lang.IllegalStateException- if the field has not been set
-
getGetterName
public java.lang.String getGetterName()
Returns the value that will be returned byProperty.getGetterName().- Throws:
java.lang.IllegalStateException- if the field has not been set
-
setFullyCheckedCast
public Property.Builder setFullyCheckedCast(boolean fullyCheckedCast)
Sets the value to be returned byProperty.isFullyCheckedCast().- Returns:
- this
Builderobject
-
mapFullyCheckedCast
public Property.Builder mapFullyCheckedCast(java.util.function.UnaryOperator<java.lang.Boolean> mapper)
Replaces the value to be returned byProperty.isFullyCheckedCast()by applyingmapperto it and using the result.- Returns:
- this
Builderobject - Throws:
java.lang.NullPointerException- ifmapperis null or returns nulljava.lang.IllegalStateException- if the field has not been set
-
isFullyCheckedCast
public boolean isFullyCheckedCast()
Returns the value that will be returned byProperty.isFullyCheckedCast().- Throws:
java.lang.IllegalStateException- if the field has not been set
-
addAccessorAnnotations
public Property.Builder addAccessorAnnotations(Excerpt element)
Addselementto the list to be returned fromProperty.getAccessorAnnotations().- Returns:
- this
Builderobject - Throws:
java.lang.NullPointerException- ifelementis null
-
addAccessorAnnotations
public Property.Builder addAccessorAnnotations(Excerpt... elements)
Adds each element ofelementsto the list to be returned fromProperty.getAccessorAnnotations().- Returns:
- this
Builderobject - Throws:
java.lang.NullPointerException- ifelementsis null or contains a null element
-
addAllAccessorAnnotations
public Property.Builder addAllAccessorAnnotations(java.util.Spliterator<? extends Excerpt> elements)
Adds each element ofelementsto the list to be returned fromProperty.getAccessorAnnotations().- Returns:
- this
Builderobject - Throws:
java.lang.NullPointerException- ifelementsis null or contains a null element
-
addAllAccessorAnnotations
public Property.Builder addAllAccessorAnnotations(java.util.stream.BaseStream<? extends Excerpt,?> elements)
Adds each element ofelementsto the list to be returned fromProperty.getAccessorAnnotations().- Returns:
- this
Builderobject - Throws:
java.lang.NullPointerException- ifelementsis null or contains a null element
-
addAllAccessorAnnotations
public Property.Builder addAllAccessorAnnotations(java.lang.Iterable<? extends Excerpt> elements)
Adds each element ofelementsto the list to be returned fromProperty.getAccessorAnnotations().- Returns:
- this
Builderobject - Throws:
java.lang.NullPointerException- ifelementsis null or contains a null element
-
mutateAccessorAnnotations
public Property.Builder mutateAccessorAnnotations(java.util.function.Consumer<? super java.util.List<Excerpt>> mutator)
Appliesmutatorto the list to be returned fromProperty.getAccessorAnnotations().This method mutates the list in-place.
mutatoris a void consumer, so any value returned from a lambda will be ignored. Take care not to call pure functions, likeCollection.stream().- Returns:
- this
Builderobject - Throws:
java.lang.NullPointerException- ifmutatoris null
-
clearAccessorAnnotations
public Property.Builder clearAccessorAnnotations()
Clears the list to be returned fromProperty.getAccessorAnnotations().- Returns:
- this
Builderobject
-
getAccessorAnnotations
public java.util.List<Excerpt> getAccessorAnnotations()
Returns an unmodifiable view of the list that will be returned byProperty.getAccessorAnnotations(). Changes to this builder will be reflected in the view.
-
addGetterAnnotations
public Property.Builder addGetterAnnotations(Excerpt element)
Addselementto the list to be returned fromProperty.getGetterAnnotations().- Returns:
- this
Builderobject - Throws:
java.lang.NullPointerException- ifelementis null
-
addGetterAnnotations
public Property.Builder addGetterAnnotations(Excerpt... elements)
Adds each element ofelementsto the list to be returned fromProperty.getGetterAnnotations().- Returns:
- this
Builderobject - Throws:
java.lang.NullPointerException- ifelementsis null or contains a null element
-
addAllGetterAnnotations
public Property.Builder addAllGetterAnnotations(java.util.Spliterator<? extends Excerpt> elements)
Adds each element ofelementsto the list to be returned fromProperty.getGetterAnnotations().- Returns:
- this
Builderobject - Throws:
java.lang.NullPointerException- ifelementsis null or contains a null element
-
addAllGetterAnnotations
public Property.Builder addAllGetterAnnotations(java.util.stream.BaseStream<? extends Excerpt,?> elements)
Adds each element ofelementsto the list to be returned fromProperty.getGetterAnnotations().- Returns:
- this
Builderobject - Throws:
java.lang.NullPointerException- ifelementsis null or contains a null element
-
addAllGetterAnnotations
public Property.Builder addAllGetterAnnotations(java.lang.Iterable<? extends Excerpt> elements)
Adds each element ofelementsto the list to be returned fromProperty.getGetterAnnotations().- Returns:
- this
Builderobject - Throws:
java.lang.NullPointerException- ifelementsis null or contains a null element
-
mutateGetterAnnotations
public Property.Builder mutateGetterAnnotations(java.util.function.Consumer<? super java.util.List<Excerpt>> mutator)
Appliesmutatorto the list to be returned fromProperty.getGetterAnnotations().This method mutates the list in-place.
mutatoris a void consumer, so any value returned from a lambda will be ignored. Take care not to call pure functions, likeCollection.stream().- Returns:
- this
Builderobject - Throws:
java.lang.NullPointerException- ifmutatoris null
-
clearGetterAnnotations
public Property.Builder clearGetterAnnotations()
Clears the list to be returned fromProperty.getGetterAnnotations().- Returns:
- this
Builderobject
-
getGetterAnnotations
public java.util.List<Excerpt> getGetterAnnotations()
Returns an unmodifiable view of the list that will be returned byProperty.getGetterAnnotations(). Changes to this builder will be reflected in the view.
-
addPutAnnotations
public Property.Builder addPutAnnotations(Excerpt element)
Addselementto the list to be returned fromProperty.getPutAnnotations().- Returns:
- this
Builderobject - Throws:
java.lang.NullPointerException- ifelementis null
-
addPutAnnotations
public Property.Builder addPutAnnotations(Excerpt... elements)
Adds each element ofelementsto the list to be returned fromProperty.getPutAnnotations().- Returns:
- this
Builderobject - Throws:
java.lang.NullPointerException- ifelementsis null or contains a null element
-
addAllPutAnnotations
public Property.Builder addAllPutAnnotations(java.util.Spliterator<? extends Excerpt> elements)
Adds each element ofelementsto the list to be returned fromProperty.getPutAnnotations().- Returns:
- this
Builderobject - Throws:
java.lang.NullPointerException- ifelementsis null or contains a null element
-
addAllPutAnnotations
public Property.Builder addAllPutAnnotations(java.util.stream.BaseStream<? extends Excerpt,?> elements)
Adds each element ofelementsto the list to be returned fromProperty.getPutAnnotations().- Returns:
- this
Builderobject - Throws:
java.lang.NullPointerException- ifelementsis null or contains a null element
-
addAllPutAnnotations
public Property.Builder addAllPutAnnotations(java.lang.Iterable<? extends Excerpt> elements)
Adds each element ofelementsto the list to be returned fromProperty.getPutAnnotations().- Returns:
- this
Builderobject - Throws:
java.lang.NullPointerException- ifelementsis null or contains a null element
-
mutatePutAnnotations
public Property.Builder mutatePutAnnotations(java.util.function.Consumer<? super java.util.List<Excerpt>> mutator)
Appliesmutatorto the list to be returned fromProperty.getPutAnnotations().This method mutates the list in-place.
mutatoris a void consumer, so any value returned from a lambda will be ignored. Take care not to call pure functions, likeCollection.stream().- Returns:
- this
Builderobject - Throws:
java.lang.NullPointerException- ifmutatoris null
-
clearPutAnnotations
public Property.Builder clearPutAnnotations()
Clears the list to be returned fromProperty.getPutAnnotations().- Returns:
- this
Builderobject
-
getPutAnnotations
public java.util.List<Excerpt> getPutAnnotations()
Returns an unmodifiable view of the list that will be returned byProperty.getPutAnnotations(). Changes to this builder will be reflected in the view.
-
mergeFrom
public Property.Builder mergeFrom(Property value)
Copies values fromvalue, appending to collections, and skipping defaults and empty optionals.- Returns:
- this
Builderobject
-
mergeFrom
public Property.Builder mergeFrom(Property.Builder template)
Copies values fromtemplate, appending to collections, and skipping defaults, empty optionals and unset properties.- Returns:
- this
Builderobject
-
clear
public Property.Builder clear()
Resets the state of this builder.- Returns:
- this
Builderobject
-
build
public Property build()
Returns a newly-createdPropertybased on the contents of thisBuilder.- Throws:
java.lang.IllegalStateException- if any field has not been set
-
buildPartial
public Property buildPartial()
Returns a newly-created partialPropertyfor use in unit tests. State checking will not be performed. Unset properties will throw anUnsupportedOperationExceptionwhen accessed via the partial object.The builder returned by
from(org.inferred.freebuilder.processor.property.Property)will propagate the partial status of its input, overridingbuild()to return another partial. This allows for robust tests of modify-rebuild code.Partials should only ever be used in tests. They permit writing robust test cases that won't fail if this type gains more application-level constraints (e.g. new required fields) in future. If you require partially complete values in production code, consider using a Builder.
-
-