Class BuildItemContainer<I,V>
java.lang.Object
io.spring.initializr.generator.buildsystem.BuildItemContainer<I,V>
- Type Parameters:
I- the type of the identifierV- the type of the item
- Direct Known Subclasses:
BomContainer, DependencyContainer, MavenRepositoryContainer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidLookup the item with the specifiedidand register it to this container.voidRegister the specifieditemwith the specifiedid.@Nullable VReturn the item with the specifiedidornullif no such item exists.booleanSpecify if this container has an item with the specified id.ids()Return aStreamof registered identifiers.booleanisEmpty()Specify if this container is empty.items()Return aStreamof registered items.booleanRemove the item with the specifiedid.
-
Constructor Details
-
BuildItemContainer
-
-
Method Details
-
isEmpty
public boolean isEmpty()Specify if this container is empty.- Returns:
trueif no item is registered
-
has
Specify if this container has an item with the specified id.- Parameters:
id- the id of an item- Returns:
trueif an item with the specifiedidis registered
-
ids
-
items
-
get
-
add
Lookup the item with the specifiedidand register it to this container.- Parameters:
id- the id of an item
-
add
-
remove
Remove the item with the specifiedid.- Parameters:
id- the id of the item to remove- Returns:
trueif such an item was registered,falseotherwise
-