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 TypeMethodDescriptionbooleanSpecify if this container has a property with the specified name.booleanisEmpty()Specify if this container is empty.Register a property with the specifiednameandvalue.values()Return the registered properties.version(VersionProperty versionProperty, String version) Register a property that refers to the specifiedversion.Register a publicVersionPropertywith 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:
trueif no property is registered
-
has
Specify if this container has a property with the specified name.- Parameters:
name- the name of a property- Returns:
trueif a property with the specifiednameis registered
-
property
Register a property with the specifiednameandvalue. If a property with thatnamealready 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 sameVersionPropertyalready exists, its value is overridden by the specifiedversion.- Parameters:
versionProperty- the name of a versionversion- the version- Returns:
- this container
-
version
Register a publicVersionPropertywith the specifiedname. If a version with the samenamealready 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.
-