public class BambooPredicates extends Object
Modifier and Type | Method and Description |
---|---|
static <T> com.google.common.base.Predicate<Iterable<? extends T>> |
any(com.google.common.base.Predicate<T> predicate) |
static com.google.common.base.Predicate<Artifact> |
artifactHasName(String artifactName)
|
static com.google.common.base.Predicate<ArtifactLink> |
artifactLinkHasArtifactWithName(String artifactName)
|
static com.google.common.base.Predicate<BuildAgent> |
buildAgentIsActive()
Deprecated.
since 5.10, use method reference to
BuildAgentPredicates.isActive(BuildAgent) |
static com.google.common.base.Predicate<BuildAgent> |
buildAgentIsActiveAndEnabled()
Deprecated.
since 5.10, use method reference to
BuildAgentPredicates.isActiveAndEnabled(BuildAgent) |
static com.google.common.base.Predicate<BuildAgent> |
buildAgentIsBusy()
Deprecated.
since 5.10, use method reference to
BuildAgentPredicates.isBusy(BuildAgent) |
static com.google.common.base.Predicate<BuildAgent> |
buildAgentIsEnabled()
Deprecated.
since 5.10, use method reference to
BuildAgentPredicates.isEnabled(BuildAgent) |
static com.google.common.base.Predicate<? super RepositoryDefinition> |
buildTrigger(ImmutableChain chain,
Set<Long> triggeringRepositories) |
static com.google.common.base.Predicate<Capability> |
capabilityKeyStartsWith(String prefix)
Get a predicate that returns true for
Capability which key starts with given prefix |
static <A,B> Predicate<A> |
compose(Predicate<B> predicate,
Function<A,? extends B> function)
Predicate compose
|
static com.google.common.base.Predicate<PlanDependency> |
dependencyChildIsChain() |
static com.google.common.base.Predicate<PlanDependency> |
dependencyNotEditable() |
static com.google.common.base.Predicate<PlanDependency> |
dependencyParentIsChain() |
static <T,K> Predicate<T> |
distinct(Function<? super T,K> keyExtractor)
Java Streams API is missing Stream#distinct(keyProvider), this is here to fill that gap
|
static com.google.common.base.Predicate<ElasticInstanceSchedule> |
elasticInstanceScheduleIsEnabled() |
static com.google.common.base.Predicate<ImmutableDeletable> |
getNotDeletedPredicate()
Deprecated.
since 5.11, use
isNotDeleted(ImmutableDeletable) as function reference |
static com.google.common.base.Predicate<BambooIdProvider> |
hasBambooObjectEqualId(BambooIdProvider bambooObject) |
static com.google.common.base.Predicate<BambooIdProvider> |
hasBambooObjectEqualId(long id) |
static com.google.common.base.Predicate<BuildStrategy> |
hasBuildStrategyEqualKey(String buildStrategyKey) |
static com.google.common.base.Predicate<TitleProvider> |
hasEqualTitle(String title) |
static com.google.common.base.Predicate<NotificationRule> |
hasNotificationRuleRecipient(String recipient) |
static com.google.common.base.Predicate<NotificationRule> |
hasNotificationRuleRecipientType(String recipientType) |
static com.google.common.base.Predicate<TaskDefinition> |
hasTaskDefinitionEqualId(long id) |
static com.google.common.base.Predicate<ImmutableArtifactDefinitionBase> |
isArtifactShared() |
static <T> com.google.common.base.Predicate<? super Class<? extends T>> |
isAssignableFrom(Class clazz) |
static com.google.common.base.Predicate<TaskDefinition> |
isFinalizingTaskDefinition()
Get a predicate that returns true for TaskDefinition which are marked as "finalizing"
|
static boolean |
isNotDeleted(ImmutableDeletable deletable) |
static com.google.common.base.Predicate<TaskIdentifier> |
isTaskDefinitionPluginKeyEqual(String pluginKey)
Get a predicate that returns true for
TaskDefinition that has equal pluginKey |
static com.google.common.base.Predicate<TaskResult> |
isTaskResultPluginKeyEqual(String pluginKey)
Get a predicate that returns true for
TaskResult which TaskDefinition has equal pluginKey |
static com.google.common.base.Predicate<Labelling> |
labelNameIn(Iterable<String> labelNames) |
static <K,V> Predicate<? super Map.Entry<K,V>> |
liftToEntryPredicate(BiPredicate<K,V> biPredicate)
Adapts the supplied biFunction so that it can be used to process map entries
|
static com.google.common.base.Predicate<Method> |
methodHasNoArguments()
Get a predicate that returns true for
Method s which have no arguments |
static com.google.common.base.Predicate<Method> |
methodNameMatchesPattern(Pattern pattern)
Get a predicate that returns true for
Method s which name matched given pattern |
static com.google.common.base.Predicate<Project> |
projectIsNotEmpty(CachedPlanManager cachedPlanManager)
Return predicate for filtering not empty projects (those which contain at least 1 plan)
|
static com.google.common.base.Predicate<ResultsSummary> |
resultsSummaryIsFailed()
Deprecated.
since 5.11, use
ResultSummaryPredicates.isFailed(ResultsSummary) |
static com.google.common.base.Predicate<ResultsSummary> |
resultsSummaryIsInProgress()
Deprecated.
since 5.11, use
ResultSummaryPredicates.isInProgress(ResultsSummary) |
static com.google.common.base.Predicate<ResultsSummary> |
resultsSummaryIsNotBuilt()
Deprecated.
since 5.11, use
ResultSummaryPredicates.isNotBuilt(ResultsSummary) |
static com.google.common.base.Predicate<ResultsSummary> |
resultsSummaryIsSuccessful()
Deprecated.
since 5.11, use
ResultSummaryPredicates.isSuccessful(ResultsSummary) |
static com.google.common.base.Predicate<String> |
startsWith(String prefix) |
static com.google.common.base.Predicate<String> |
startsWithAny(String... prefixes) |
static com.google.common.base.Predicate<String> |
stringIsBlank()
Deprecated.
since 5.10, use
StringUtils.isBlank(CharSequence) as lambda |
static com.google.common.base.Predicate<String> |
stringIsNotEmpty()
Deprecated.
since 5.10, use
StringUtils.isNotEmpty(CharSequence) as lambda |
static com.google.common.base.Predicate<SystemProperty> |
systemPropertyHasValue() |
static com.google.common.base.Predicate<TestClassResult> |
testResultsInteresting() |
public static boolean isNotDeleted(ImmutableDeletable deletable)
@Deprecated @NotNull public static com.google.common.base.Predicate<ImmutableDeletable> getNotDeletedPredicate()
isNotDeleted(ImmutableDeletable)
as function reference@Deprecated @NotNull public static com.google.common.base.Predicate<String> stringIsNotEmpty()
StringUtils.isNotEmpty(CharSequence)
as lambda@Deprecated @NotNull public static com.google.common.base.Predicate<String> stringIsBlank()
StringUtils.isBlank(CharSequence)
as lambda@NotNull public static com.google.common.base.Predicate<String> startsWith(@NotNull String prefix)
@NotNull public static com.google.common.base.Predicate<String> startsWithAny(@NotNull String... prefixes)
@Deprecated @NotNull public static com.google.common.base.Predicate<ResultsSummary> resultsSummaryIsFailed()
ResultSummaryPredicates.isFailed(ResultsSummary)
@Deprecated @NotNull public static com.google.common.base.Predicate<ResultsSummary> resultsSummaryIsNotBuilt()
ResultSummaryPredicates.isNotBuilt(ResultsSummary)
@Deprecated @NotNull public static com.google.common.base.Predicate<ResultsSummary> resultsSummaryIsSuccessful()
ResultSummaryPredicates.isSuccessful(ResultsSummary)
@Deprecated @NotNull public static com.google.common.base.Predicate<ResultsSummary> resultsSummaryIsInProgress()
ResultSummaryPredicates.isInProgress(ResultsSummary)
@NotNull public static <T> com.google.common.base.Predicate<? super Class<? extends T>> isAssignableFrom(Class clazz)
@NotNull public static com.google.common.base.Predicate<Project> projectIsNotEmpty(@NotNull CachedPlanManager cachedPlanManager)
cachedPlanManager
- immutable plan cache service component@NotNull public static com.google.common.base.Predicate<PlanDependency> dependencyChildIsChain()
@NotNull public static com.google.common.base.Predicate<PlanDependency> dependencyParentIsChain()
@NotNull public static com.google.common.base.Predicate<PlanDependency> dependencyNotEditable()
@NotNull public static com.google.common.base.Predicate<TestClassResult> testResultsInteresting()
@NotNull public static com.google.common.base.Predicate<Labelling> labelNameIn(@NotNull Iterable<String> labelNames)
@Deprecated @NotNull public static com.google.common.base.Predicate<BuildAgent> buildAgentIsActive()
BuildAgentPredicates.isActive(BuildAgent)
@Deprecated @NotNull public static com.google.common.base.Predicate<BuildAgent> buildAgentIsActiveAndEnabled()
BuildAgentPredicates.isActiveAndEnabled(BuildAgent)
@Deprecated @NotNull public static com.google.common.base.Predicate<BuildAgent> buildAgentIsBusy()
BuildAgentPredicates.isBusy(BuildAgent)
@Deprecated @NotNull public static com.google.common.base.Predicate<BuildAgent> buildAgentIsEnabled()
BuildAgentPredicates.isEnabled(BuildAgent)
@NotNull public static com.google.common.base.Predicate<ElasticInstanceSchedule> elasticInstanceScheduleIsEnabled()
@NotNull public static com.google.common.base.Predicate<SystemProperty> systemPropertyHasValue()
public static com.google.common.base.Predicate<TaskDefinition> isFinalizingTaskDefinition()
public static com.google.common.base.Predicate<TaskDefinition> hasTaskDefinitionEqualId(long id)
public static com.google.common.base.Predicate<TaskIdentifier> isTaskDefinitionPluginKeyEqual(@NotNull String pluginKey)
TaskDefinition
that has equal pluginKeypluginKey
- id to be matched in TaskDefinition
public static com.google.common.base.Predicate<TaskResult> isTaskResultPluginKeyEqual(@NotNull String pluginKey)
TaskResult
which TaskDefinition
has equal pluginKeypluginKey
- id to be matched in TaskDefinition
public static com.google.common.base.Predicate<Capability> capabilityKeyStartsWith(@NotNull String prefix)
Capability
which key starts with given prefixprefix
- prefix to be matched in Capability
public static com.google.common.base.Predicate<Method> methodHasNoArguments()
Method
s which have no argumentspublic static com.google.common.base.Predicate<Method> methodNameMatchesPattern(Pattern pattern)
Method
s which name matched given patternpattern
- pattern to be matched against method namepublic static com.google.common.base.Predicate<? super RepositoryDefinition> buildTrigger(@NotNull ImmutableChain chain, @Nullable Set<Long> triggeringRepositories)
public static com.google.common.base.Predicate<BambooIdProvider> hasBambooObjectEqualId(@NotNull BambooIdProvider bambooObject)
public static com.google.common.base.Predicate<BambooIdProvider> hasBambooObjectEqualId(long id)
public static com.google.common.base.Predicate<ArtifactLink> artifactLinkHasArtifactWithName(@NotNull String artifactName)
artifactName
- name of the artifactpublic static com.google.common.base.Predicate<Artifact> artifactHasName(@NotNull String artifactName)
artifactName
- name of the artifactpublic static com.google.common.base.Predicate<TitleProvider> hasEqualTitle(String title)
public static <T> com.google.common.base.Predicate<Iterable<? extends T>> any(@NotNull com.google.common.base.Predicate<T> predicate)
public static com.google.common.base.Predicate<BuildStrategy> hasBuildStrategyEqualKey(@NotNull String buildStrategyKey)
public static com.google.common.base.Predicate<NotificationRule> hasNotificationRuleRecipientType(@NotNull String recipientType)
public static com.google.common.base.Predicate<NotificationRule> hasNotificationRuleRecipient(@NotNull String recipient)
public static com.google.common.base.Predicate<ImmutableArtifactDefinitionBase> isArtifactShared()
public static <T,K> Predicate<T> distinct(Function<? super T,K> keyExtractor)
public static <K,V> Predicate<? super Map.Entry<K,V>> liftToEntryPredicate(BiPredicate<K,V> biPredicate)
Copyright © 2016 Atlassian Software Systems Pty Ltd. All rights reserved.