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<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<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 boolean |
hasTestCases(TestClassResult testClassResult) |
static com.google.common.base.Predicate<ImmutableArtifactDefinitionBase> |
isArtifactShared() |
static <T> com.google.common.base.Predicate<? super Class<? extends T>> |
isAssignableFrom(Class clazz) |
static Predicate<PlanRepositoryDefinition> |
isChainTrigger(ImmutableChain chain,
Set<Long> triggeringRepositories) |
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<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 <T> Predicate<T> |
onceTrueAlwaysTrue(Predicate<T> predicate)
Returns a predicate that once returns true, always return true.
|
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<SystemProperty> |
systemPropertyHasValue() |
static <T> Predicate<T> |
testFirstApplyToAll(Predicate<T> predicate)
Returns a predicate that always returns the first value it returned.
|
public static boolean isNotDeleted(ImmutableDeletable deletable)
@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()
public static boolean hasTestCases(@NotNull TestClassResult testClassResult)
@NotNull public static com.google.common.base.Predicate<Labelling> labelNameIn(@NotNull Iterable<String> labelNames)
@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<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 Predicate<PlanRepositoryDefinition> isChainTrigger(@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)
public static <A,B> Predicate<A> compose(Predicate<B> predicate, Function<A,? extends B> function)
public static <T> Predicate<T> onceTrueAlwaysTrue(Predicate<T> predicate)
Copyright © 2019 Atlassian Software Systems Pty Ltd. All rights reserved.