Class Comparators


  • public class Comparators
    extends Object
    • Method Detail

      • getBuildCompletedDateComparator

        @NotNull
        public static @NotNull Comparator<ResultsSummary> getBuildCompletedDateComparator()
      • getBuildDateOrdering

        @NotNull
        public static @NotNull com.google.common.collect.Ordering<ResultStatisticsProvider> getBuildDateOrdering()
      • getBranchUpdatedDateOrdering

        @NotNull
        public static @NotNull com.google.common.collect.Ordering<ImmutablePlan> getBranchUpdatedDateOrdering()
        Comparator for sorting by enabled/disabled then updated then created dates of branches
      • getDescriptionProviderOrdering

        @NotNull
        public static @NotNull com.google.common.collect.Ordering<DescriptionProvider> getDescriptionProviderOrdering()
      • getLabelCountAlphabeticComparator

        @NotNull
        public static @NotNull Comparator<LabelCount> getLabelCountAlphabeticComparator()
      • getLabelCountRankComparator

        @NotNull
        public static @NotNull Comparator<LabelCount> getLabelCountRankComparator()
      • getTopLevelPlanNameProviderCaseInsensitiveOrdering

        @NotNull
        public static <T extends ImmutableChain> @NotNull com.google.common.collect.Ordering<T> getTopLevelPlanNameProviderCaseInsensitiveOrdering()
      • stringPropertyComparator

        @NotNull
        public static <T> @NotNull Comparator<T> stringPropertyComparator​(@NotNull
                                                                          @NotNull Class<T> beanClass,
                                                                          @NotNull
                                                                          @NotNull String propertyName)
      • stringPropertyCaseInsensitiveComparator

        @NotNull
        public static <T> @NotNull Comparator<T> stringPropertyCaseInsensitiveComparator​(@NotNull
                                                                                         @NotNull Class<T> beanClass,
                                                                                         @NotNull
                                                                                         @NotNull String propertyName)
      • getResultsSummaryNumberOrdering

        @NotNull
        public static @NotNull com.google.common.collect.Ordering<ResultsSummary> getResultsSummaryNumberOrdering()
      • getResultsSummaryNameAndNumberComparator

        @NotNull
        public static @NotNull com.google.common.collect.Ordering<ResultsSummary> getResultsSummaryNameAndNumberComparator()
      • jobStagePlanNameCaseInsensitiveCompare

        public static int jobStagePlanNameCaseInsensitiveCompare​(ImmutableJob o1,
                                                                 ImmutableJob o2)
      • getApplicationBuildNumberComparator

        @NotNull
        public static @NotNull Comparator<String> getApplicationBuildNumberComparator()
      • getPlanNameResultOrdering

        @NotNull
        public static @NotNull com.google.common.collect.Ordering<ResultsSummary> getPlanNameResultOrdering()
      • getVariableDefinitionContextOrdering

        @NotNull
        public static @NotNull com.google.common.collect.Ordering<VariableDefinitionContext> getVariableDefinitionContextOrdering()
      • getVariableDefinitionOrdering

        @NotNull
        public static @NotNull com.google.common.collect.Ordering<VariableDefinition> getVariableDefinitionOrdering()
      • getModuleDescriptorNameOrdering

        @NotNull
        public static @NotNull com.google.common.collect.Ordering<com.atlassian.plugin.ModuleDescriptor<?>> getModuleDescriptorNameOrdering()
      • getPlanResultKeyOrdering

        @NotNull
        public static @NotNull com.google.common.collect.Ordering<PlanResultKey> getPlanResultKeyOrdering()
      • getBambooIdProviderOrdering

        @NotNull
        public static @NotNull com.google.common.collect.Ordering<BambooIdProvider> getBambooIdProviderOrdering()
      • isGreater

        public static <T extends Comparable<T>> boolean isGreater​(@NotNull
                                                                  T o1,
                                                                  @NotNull
                                                                  T o2)
        Returns:
        true if o1 is greater than o2 according to natural compare order
      • isGreater

        public static <T> boolean isGreater​(@NotNull
                                            T o1,
                                            @NotNull
                                            T o2,
                                            @NotNull
                                            @NotNull Comparator<T> comparator)
        Returns:
        true if o1 is greater than o2 according to comparator
      • isGreaterOrEqual

        public static <T> boolean isGreaterOrEqual​(@NotNull
                                                   T o1,
                                                   @NotNull
                                                   T o2,
                                                   @NotNull
                                                   @NotNull Comparator<T> comparator)
        Returns:
        true if o1 is greater or equal to o2 according to comparator
      • isLesser

        public static <T> boolean isLesser​(@NotNull
                                           T o1,
                                           @NotNull
                                           T o2,
                                           @NotNull
                                           @NotNull Comparator<T> comparator)
        Returns:
        true if o1 is less than o2 according to comparator
      • isLesserOrEqual

        public static <T> boolean isLesserOrEqual​(@NotNull
                                                  T o1,
                                                  @NotNull
                                                  T o2,
                                                  @NotNull
                                                  @NotNull Comparator<T> comparator)
        Returns:
        true if o1 is less or equal to o2 according to comparator