Class PropertyContainer
java.lang.Object
io.spring.initializr.generator.buildsystem.PropertyContainer
A container for properties. Arbitrary properties can be specified as well as ones that
refer to a
version
.- Author:
- Stephane Nicoll
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Specify if this container has a property with the specified name.boolean
isEmpty()
Specify if this container is empty.Register a property with the specifiedname
andvalue
.values()
Return the registered properties.version
(VersionProperty versionProperty, String version) Register a property that refers to the specifiedversion
.Register a publicVersionProperty
with the specifiedname
.versions
(Function<VersionProperty, String> nameFactory) Return the registered versions using the specifiednameFactory
.
-
Constructor Details
-
PropertyContainer
public PropertyContainer()
-
-
Method Details
-
isEmpty
public boolean isEmpty()Specify if this container is empty.- Returns:
true
if no property is registered
-
has
Specify if this container has a property with the specified name.- Parameters:
name
- the name of a property- Returns:
true
if a property with the specifiedname
is registered
-
property
Register a property with the specifiedname
andvalue
. If a property with thatname
already exists, its value is overridden by the specifiedvalue
.- Parameters:
name
- the name of a propertyvalue
- the value of the property- Returns:
- this container
- See Also:
-
version
Register a property that refers to the specifiedversion
. If a version with the sameVersionProperty
already exists, its value is overridden by the specifiedversion
.- Parameters:
versionProperty
- the name of a versionversion
- the version- Returns:
- this container
-
version
Register a publicVersionProperty
with the specifiedname
. If a version with the samename
already exists, its value is overridden by the specifiedversion
.- Parameters:
name
- the public name of a versionversion
- the version- Returns:
- this container
- See Also:
-
values
Return the registered properties. Does not contain registered versions.- Returns:
- the property entries
-
versions
Return the registered versions using the specifiednameFactory
.- Parameters:
nameFactory
- the factory to use to generate a version name based on aVersionProperty
- Returns:
- the version entries.
-