-
- Type Parameters:
A- The builder class
- All Known Subinterfaces:
Annotation.Builder,Content.Builder<A,D>,Group.Builder,ImmutableProperties.Builder
public interface WithPropertiesBuilder<A>Helper interface to indicate that a builder should processor adding properties to an object
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description AwithoutProperty(String key)Remove a propertyAwithoutProperty(String key, Object value)Remove a property with matching key and valueAwithProperties(Properties properties)Add in existing propertiesAwithProperty(String key, Object value)Add a propertyAwithPropertyIfPresent(String key, Optional<?> value)Add a property, if it is present (don't add it otherwise)
-
-
-
Method Detail
-
withProperty
A withProperty(String key, Object value)
Add a property- Parameters:
key- the keyvalue- the value- Returns:
- a builder with the key-value property pair added to it
-
withPropertyIfPresent
A withPropertyIfPresent(String key, Optional<?> value)
Add a property, if it is present (don't add it otherwise)- Parameters:
key- the keyvalue- the value- Returns:
- a builder with the key-value property pair added to it, if the value is present
-
withoutProperty
A withoutProperty(String key, Object value)
Remove a property with matching key and value- Parameters:
key- the key to removevalue- the value to remove- Returns:
- a builder with the key-value property pair removed from it
-
withoutProperty
A withoutProperty(String key)
Remove a property- Parameters:
key- the key to remove- Returns:
- a builder with the key removed from it
-
withProperties
A withProperties(Properties properties)
Add in existing properties- Parameters:
properties- to add- Returns:
- a builder with the specified properties
-
-