Class MavenProfileContainer
java.lang.Object
io.spring.initializr.generator.buildsystem.maven.MavenProfileContainer
A container for
maven profiles.- Author:
- Stephane Nicoll, Daniel Andres Pelaez Lopez
-
Constructor Summary
ConstructorsConstructorDescriptionMavenProfileContainer(BuildItemResolver buildItemResolver) Create an instance with theBuildItemResolverto use. -
Method Summary
Modifier and TypeMethodDescriptionbooleanSpecify if this container has a profile with the specifiedid.Return the profile with the specifiedid.ids()Return aStreamof registered profile identifiers.booleanisEmpty()Specify if this container is empty.booleanRemove the profile with the specifiedid.values()Returns aStreamof registeredMavenProfiles.
-
Constructor Details
-
MavenProfileContainer
Create an instance with theBuildItemResolverto use.- Parameters:
buildItemResolver- the build item resolver to use
-
-
Method Details
-
isEmpty
public boolean isEmpty()Specify if this container is empty.- Returns:
trueif noMavenProfileis added
-
has
Specify if this container has a profile with the specifiedid.- Parameters:
id- the id of the profile- Returns:
trueif a profile with the specifiedidexists
-
ids
Return aStreamof registered profile identifiers.- Returns:
- a stream of profile ids
-
values
Returns aStreamof registeredMavenProfiles.- Returns:
- a stream of
MavenProfiles
-
id
Return the profile with the specifiedid. If no such profile exists a new profile is created.- Parameters:
id- the id of the profile- Returns:
- the
MavenProfilefor that id
-
remove
Remove the profile with the specifiedid.- Parameters:
id- the id of the profile- Returns:
trueif such a profile was registered,falseotherwise
-