public class BambooPredicates extends Object
Modifier and Type | Method and Description |
---|---|
static <T> com.google.common.base.Predicate<Iterable<? extends T>> |
any(@NotNull com.google.common.base.Predicate<T> predicate) |
static com.google.common.base.Predicate<Artifact> |
artifactHasName(@NotNull String artifactName)
|
static com.google.common.base.Predicate<ArtifactLink> |
artifactLinkHasArtifactWithName(@NotNull String artifactName)
|
static com.google.common.base.Predicate<Capability> |
capabilityKeyStartsWith(@NotNull 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 @NotNull com.google.common.base.Predicate<PlanDependency> |
dependencyChildIsChain() |
static @NotNull com.google.common.base.Predicate<PlanDependency> |
dependencyNotEditable() |
static @NotNull 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 @NotNull com.google.common.base.Predicate<ElasticInstanceSchedule> |
elasticInstanceScheduleIsEnabled() |
static com.google.common.base.Predicate<BambooIdProvider> |
hasBambooObjectEqualId(@NotNull BambooIdProvider bambooObject) |
static com.google.common.base.Predicate<BambooIdProvider> |
hasBambooObjectEqualId(long id) |
static com.google.common.base.Predicate<TitleProvider> |
hasEqualTitle(String title) |
static Predicate<NotificationRule> |
hasNotificationRuleRecipient(@NotNull String recipient) |
static Predicate<NotificationRule> |
hasNotificationRuleRecipientType(@NotNull String recipientType) |
static com.google.common.base.Predicate<TaskDefinition> |
hasTaskDefinitionEqualId(long id) |
static boolean |
hasTestCases(@NotNull TestClassResult testClassResult) |
static com.google.common.base.Predicate<ImmutableArtifactDefinitionBase> |
isArtifactShared() |
static <T> @NotNull com.google.common.base.Predicate<? super Class<? extends T>> |
isAssignableFrom(Class clazz) |
static Predicate<PlanRepositoryDefinition> |
isChainTrigger(@NotNull ImmutableChain chain,
@Nullable 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(@NotNull String pluginKey)
Get a predicate that returns true for
TaskResult which TaskDefinition has equal pluginKey |
static @NotNull com.google.common.base.Predicate<Labelling> |
labelNameIn(@NotNull 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 <T> Predicate<T> |
or(Iterable<Predicate<T>> predicates)
Converts list of predicates to one predicate which returns true if at least on predicate returns true (OR function)
|
static @NotNull com.google.common.base.Predicate<Project> |
projectIsNotEmpty(@NotNull CachedPlanManager cachedPlanManager)
Return predicate for filtering not empty projects (those which contain at least 1 plan)
|
static @NotNull 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> @NotNull com.google.common.base.Predicate<? super Class<? extends T>> isAssignableFrom(Class clazz)
@NotNull public static @NotNull com.google.common.base.Predicate<Project> projectIsNotEmpty(@NotNull @NotNull CachedPlanManager cachedPlanManager)
cachedPlanManager
- immutable plan cache service component@NotNull public static @NotNull com.google.common.base.Predicate<PlanDependency> dependencyChildIsChain()
@NotNull public static @NotNull com.google.common.base.Predicate<PlanDependency> dependencyParentIsChain()
@NotNull public static @NotNull com.google.common.base.Predicate<PlanDependency> dependencyNotEditable()
public static boolean hasTestCases(@NotNull @NotNull TestClassResult testClassResult)
@NotNull public static @NotNull com.google.common.base.Predicate<Labelling> labelNameIn(@NotNull @NotNull Iterable<String> labelNames)
@NotNull public static @NotNull com.google.common.base.Predicate<ElasticInstanceSchedule> elasticInstanceScheduleIsEnabled()
@NotNull public static @NotNull 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 @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 @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 @NotNull ImmutableChain chain, @Nullable @Nullable Set<Long> triggeringRepositories)
public static com.google.common.base.Predicate<BambooIdProvider> hasBambooObjectEqualId(@NotNull @NotNull BambooIdProvider bambooObject)
public static com.google.common.base.Predicate<BambooIdProvider> hasBambooObjectEqualId(long id)
public static com.google.common.base.Predicate<ArtifactLink> artifactLinkHasArtifactWithName(@NotNull @NotNull String artifactName)
artifactName
- name of the artifactpublic static com.google.common.base.Predicate<Artifact> artifactHasName(@NotNull @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 @NotNull com.google.common.base.Predicate<T> predicate)
public static Predicate<NotificationRule> hasNotificationRuleRecipientType(@NotNull @NotNull String recipientType)
public static Predicate<NotificationRule> hasNotificationRuleRecipient(@NotNull @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)
public static <T> Predicate<T> testFirstApplyToAll(Predicate<T> predicate)
Copyright © 2022 Atlassian Software Systems Pty Ltd. All rights reserved.