public class Comparators extends Object
Modifier and Type | Method and Description |
---|---|
static Comparator<String> |
getApplicationBuildNumberComparator() |
static com.google.common.collect.Ordering<BambooIdProvider> |
getBambooIdProviderOrdering() |
static com.google.common.collect.Ordering<ImmutablePlan> |
getBranchUpdatedDateOrdering()
Comparator for sorting by enabled/disabled then updated then created dates of branches
|
static Comparator<ResultsSummary> |
getBuildCompletedDateComparator() |
static com.google.common.collect.Ordering<ResultStatisticsProvider> |
getBuildDateOrdering() |
static com.google.common.collect.Ordering<DescriptionProvider> |
getDescriptionProviderOrdering() |
static Comparator<LabelCount> |
getLabelCountAlphabeticComparator() |
static Comparator<LabelCount> |
getLabelCountRankComparator() |
static com.google.common.collect.Ordering<com.atlassian.plugin.ModuleDescriptor<?>> |
getModuleDescriptorNameOrdering() |
static com.google.common.collect.Ordering<NameProvider> |
getNameProviderCaseInsensitiveOrdering()
Do not use this for plans unless you know the plans you are sorting are within the same parent (e.g.
|
static com.google.common.collect.Ordering<NameProvider> |
getNameProviderOrdering()
Not that this order is case sensitive.
|
static com.google.common.collect.Ordering<ImmutablePlan> |
getPlanNameProviderCaseInsensitiveOrdering()
This method will be slower than
getTopLevelPlanNameProviderCaseInsensitiveOrdering() so consider using that
instead. |
static com.google.common.collect.Ordering<ResultsSummary> |
getPlanNameResultOrdering() |
static com.google.common.collect.Ordering<PlanResultKey> |
getPlanResultKeyOrdering() |
static <T extends NameProvider & ProjectIdProvider> |
getProjectAwareRepositoryComparator() |
static com.google.common.collect.Ordering<ResultsSummary> |
getResultsSummaryNameAndNumberComparator() |
static com.google.common.collect.Ordering<ResultsSummary> |
getResultsSummaryNumberOrdering() |
static <T extends ImmutableChain> |
getTopLevelPlanNameProviderCaseInsensitiveOrdering() |
static com.google.common.collect.Ordering<VariableDefinitionContext> |
getVariableDefinitionContextOrdering() |
static com.google.common.collect.Ordering<VariableDefinition> |
getVariableDefinitionOrdering() |
static <T extends Comparable<T>> |
isGreater(T o1,
T o2) |
static <T> boolean |
isGreater(T o1,
T o2,
Comparator<T> comparator) |
static <T> boolean |
isGreaterOrEqual(T o1,
T o2,
Comparator<T> comparator) |
static <T> boolean |
isLesser(T o1,
T o2,
Comparator<T> comparator) |
static <T> boolean |
isLesserOrEqual(T o1,
T o2,
Comparator<T> comparator) |
static int |
jobStagePlanNameCaseInsensitiveCompare(ImmutableJob o1,
ImmutableJob o2) |
static <T> Comparator<T> |
stringPropertyCaseInsensitiveComparator(Class<T> beanClass,
String propertyName) |
static <T> Comparator<T> |
stringPropertyComparator(Class<T> beanClass,
String propertyName) |
public static <T extends NameProvider & ProjectIdProvider> Function<Map<Long,ProjectIdentifier>,Comparator<T>> getProjectAwareRepositoryComparator()
@NotNull public static Comparator<ResultsSummary> getBuildCompletedDateComparator()
@NotNull public static com.google.common.collect.Ordering<ResultStatisticsProvider> getBuildDateOrdering()
@NotNull public static com.google.common.collect.Ordering<ImmutablePlan> getBranchUpdatedDateOrdering()
@NotNull public static com.google.common.collect.Ordering<DescriptionProvider> getDescriptionProviderOrdering()
@NotNull public static Comparator<LabelCount> getLabelCountAlphabeticComparator()
@NotNull public static Comparator<LabelCount> getLabelCountRankComparator()
@NotNull public static com.google.common.collect.Ordering<NameProvider> getNameProviderOrdering()
getNameProviderCaseInsensitiveOrdering()
instead@NotNull public static <T extends ImmutableChain> com.google.common.collect.Ordering<T> getTopLevelPlanNameProviderCaseInsensitiveOrdering()
@NotNull public static com.google.common.collect.Ordering<ImmutablePlan> getPlanNameProviderCaseInsensitiveOrdering()
getTopLevelPlanNameProviderCaseInsensitiveOrdering()
so consider using that
instead.Ordering
object@NotNull public static com.google.common.collect.Ordering<NameProvider> getNameProviderCaseInsensitiveOrdering()
getTopLevelPlanNameProviderCaseInsensitiveOrdering()
or getPlanNameProviderCaseInsensitiveOrdering()
instead@NotNull public static <T> Comparator<T> stringPropertyComparator(@NotNull Class<T> beanClass, @NotNull String propertyName)
@NotNull public static <T> Comparator<T> stringPropertyCaseInsensitiveComparator(@NotNull Class<T> beanClass, @NotNull String propertyName)
@NotNull public static com.google.common.collect.Ordering<ResultsSummary> getResultsSummaryNumberOrdering()
@NotNull public static com.google.common.collect.Ordering<ResultsSummary> getResultsSummaryNameAndNumberComparator()
public static int jobStagePlanNameCaseInsensitiveCompare(ImmutableJob o1, ImmutableJob o2)
@NotNull public static Comparator<String> getApplicationBuildNumberComparator()
@NotNull public static com.google.common.collect.Ordering<ResultsSummary> getPlanNameResultOrdering()
@NotNull public static com.google.common.collect.Ordering<VariableDefinitionContext> getVariableDefinitionContextOrdering()
@NotNull public static com.google.common.collect.Ordering<VariableDefinition> getVariableDefinitionOrdering()
@NotNull public static com.google.common.collect.Ordering<com.atlassian.plugin.ModuleDescriptor<?>> getModuleDescriptorNameOrdering()
@NotNull public static com.google.common.collect.Ordering<PlanResultKey> getPlanResultKeyOrdering()
@NotNull public static com.google.common.collect.Ordering<BambooIdProvider> getBambooIdProviderOrdering()
public static <T extends Comparable<T>> boolean isGreater(@NotNull T o1, @NotNull T o2)
public static <T> boolean isGreater(@NotNull T o1, @NotNull T o2, @NotNull Comparator<T> comparator)
public static <T> boolean isGreaterOrEqual(@NotNull T o1, @NotNull T o2, @NotNull Comparator<T> comparator)
public static <T> boolean isLesser(@NotNull T o1, @NotNull T o2, @NotNull Comparator<T> comparator)
public static <T> boolean isLesserOrEqual(@NotNull T o1, @NotNull T o2, @NotNull Comparator<T> comparator)
Copyright © 2021 Atlassian Software Systems Pty Ltd. All rights reserved.