Class RequirementSetImpl
java.lang.Object
com.atlassian.core.bean.EntityObject
com.atlassian.bamboo.core.BambooEntityObject
com.atlassian.bamboo.v2.build.agent.capability.RequirementSetImpl
- All Implemented Interfaces:
BambooIdProvider
,BambooObject
,MinimalRequirementSet
,RequirementSet
,ImmutableRequirementSet
,Cloneable
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addAllRequirements
(Iterable<Requirement> requirements) Adds all the specified requirements to the setvoid
addRequirement
(@NotNull Requirement requirement) Adds a requirement to the set.boolean
getRequirement
(long id) Get a requirement from the set via the id.getRequirement
(@NotNull String key, long ownerId) Get a requirement from the set via the key and ownerId.@NotNull Set<Requirement>
Get all requirements as aSet
getRequirementsForPlugin
(@NotNull String pluginModuleKey, long ownerId) Gets all requirements that match the specifiedImmutableRequirement.getPluginModuleKey()
andImmutableRequirement.getOwnerId()
@NotNull Set<Requirement>
getSystemRequirements
(String type) Gets a subset of requirements which are of a particular system type.int
hashCode()
boolean
removeRequirement
(@NotNull ImmutableRequirement requirement) Removes the requirement from the set.int
removeRequirements
(@NotNull Iterable<Requirement> requirementIterable) Removes all the specifiedRequirement
s from the set.int
removeRequirements
(@NotNull Predicate<Requirement> requirementPredicate) Remove requirements from set if they match the givenPredicate
void
setRequirements
(Set<Requirement> requirements) toString()
Methods inherited from class com.atlassian.core.bean.EntityObject
clone, getCreationDate, getCurrentDate, getId, getLastModificationDate, setClock, setCreationDate, setId, setLastModificationDate
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.atlassian.bamboo.core.BambooIdProvider
getId
Methods inherited from interface com.atlassian.bamboo.core.BambooObject
setId
-
Constructor Details
-
RequirementSetImpl
public RequirementSetImpl() -
RequirementSetImpl
-
-
Method Details
-
getRequirement
Description copied from interface:RequirementSet
Get a requirement from the set via the key and ownerId.- Specified by:
getRequirement
in interfaceRequirementSet
- Returns:
- requirement
-
getRequirement
Description copied from interface:RequirementSet
Get a requirement from the set via the id.- Specified by:
getRequirement
in interfaceImmutableRequirementSet
- Specified by:
getRequirement
in interfaceRequirementSet
- Returns:
- requirement
-
getRequirements
Description copied from interface:ImmutableRequirementSet
Get all requirements as aSet
- Specified by:
getRequirements
in interfaceImmutableRequirementSet
- Specified by:
getRequirements
in interfaceRequirementSet
- Returns:
- requirements
-
getRequirementsForPlugin
public Set<Requirement> getRequirementsForPlugin(@NotNull @NotNull String pluginModuleKey, long ownerId) Description copied from interface:RequirementSet
Gets all requirements that match the specifiedImmutableRequirement.getPluginModuleKey()
andImmutableRequirement.getOwnerId()
- Specified by:
getRequirementsForPlugin
in interfaceRequirementSet
- Returns:
- requirements
-
addRequirement
Description copied from interface:RequirementSet
Adds a requirement to the set.- Specified by:
addRequirement
in interfaceRequirementSet
-
addAllRequirements
Description copied from interface:RequirementSet
Adds all the specified requirements to the set- Specified by:
addAllRequirements
in interfaceRequirementSet
-
removeRequirement
Description copied from interface:RequirementSet
Removes the requirement from the set.- Specified by:
removeRequirement
in interfaceRequirementSet
- Parameters:
requirement
- to remove- Returns:
- removed if the requirement was removed
-
removeRequirements
Description copied from interface:RequirementSet
Remove requirements from set if they match the givenPredicate
- Specified by:
removeRequirements
in interfaceRequirementSet
- Parameters:
requirementPredicate
- for requirements to be removed from the currentRequirementSet
- Returns:
- count of matching requirements removed
-
removeRequirements
Description copied from interface:RequirementSet
Removes all the specifiedRequirement
s from the set.- Specified by:
removeRequirements
in interfaceRequirementSet
- Parameters:
requirementIterable
- to remove- Returns:
- count of matching requirements removed
-
getSystemRequirements
Description copied from interface:RequirementSet
Gets a subset of requirements which are of a particular system type. e.g. system.builder or system.jdk.- Specified by:
getSystemRequirements
in interfaceRequirementSet
- Returns:
- requirements
-
setRequirements
-
toString
-
equals
- Overrides:
equals
in classcom.atlassian.core.bean.EntityObject
-
hashCode
public int hashCode()- Overrides:
hashCode
in classcom.atlassian.core.bean.EntityObject
-