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 theBuildItemResolver
to use. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Specify if this container has a profile with the specifiedid
.Return the profile with the specifiedid
.ids()
Return aStream
of registered profile identifiers.boolean
isEmpty()
Specify if this container is empty.boolean
Remove the profile with the specifiedid
.values()
Returns aStream
of registeredMavenProfile
s.
-
Constructor Details
-
MavenProfileContainer
Create an instance with theBuildItemResolver
to use.- Parameters:
buildItemResolver
- the build item resolver to use
-
-
Method Details
-
isEmpty
public boolean isEmpty()Specify if this container is empty.- Returns:
true
if noMavenProfile
is added
-
has
Specify if this container has a profile with the specifiedid
.- Parameters:
id
- the id of the profile- Returns:
true
if a profile with the specifiedid
exists
-
ids
Return aStream
of registered profile identifiers.- Returns:
- a stream of profile ids
-
values
Returns aStream
of registeredMavenProfile
s.- Returns:
- a stream of
MavenProfile
s
-
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
MavenProfile
for that id
-
remove
Remove the profile with the specifiedid
.- Parameters:
id
- the id of the profile- Returns:
true
if such a profile was registered,false
otherwise
-