Class MavenProfileContainer

java.lang.Object
io.spring.initializr.generator.buildsystem.maven.MavenProfileContainer

public class MavenProfileContainer extends Object
A container for maven profiles.
Author:
Stephane Nicoll, Daniel Andres Pelaez Lopez
  • Constructor Details

    • MavenProfileContainer

      public MavenProfileContainer(BuildItemResolver buildItemResolver)
      Create an instance with the BuildItemResolver 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 no MavenProfile is added
    • has

      public boolean has(String id)
      Specify if this container has a profile with the specified id.
      Parameters:
      id - the id of the profile
      Returns:
      true if a profile with the specified id exists
    • ids

      public Stream<String> ids()
      Return a Stream of registered profile identifiers.
      Returns:
      a stream of profile ids
    • values

      public Stream<MavenProfile> values()
      Returns a Stream of registered MavenProfiles.
      Returns:
      a stream of MavenProfiles
    • id

      public MavenProfile id(String id)
      Return the profile with the specified id. If no such profile exists a new profile is created.
      Parameters:
      id - the id of the profile
      Returns:
      the MavenProfile for that id
    • remove

      public boolean remove(String id)
      Remove the profile with the specified id.
      Parameters:
      id - the id of the profile
      Returns:
      true if such a profile was registered, false otherwise