Class CleanupUtils


  • public final class CleanupUtils
    extends Object
    Since:
    2020.1.1
    • Method Detail

      • dumpIds

        @NotNull
        public static String dumpIds​(@NotNull
                                     gnu.trove.TLongCollection ids,
                                     int maxCount)
      • toKeepLevel

        @NotNull
        public static KeepLevel toKeepLevel​(@NotNull
                                            CleanupLevel cleanupLevel)
        A method that maps CleanupLevel to KeepLevel in such a way that most appropriate KeepLevel is selected (KeepLevel enum is more granular). This conversion is expected to be done in such a way so that 'cleanupLevel == toCleanupLevel(toKeepLevel(cleanupLevel))' would hold true for any value of 'cleanupLevel'.
      • extendIdsIfNeed

        @NotNull
        public static String[] extendIdsIfNeed​(@NotNull
                                               List<String> ids,
                                               int packSize)
        Returns array of the provided ids with size packSize, filled at the end with the last element of ids if need.
      • replaceNewlinesInPatterns

        @NotNull
        public static String replaceNewlinesInPatterns​(@NotNull
                                                       String patterns)
      • serializeUnorderedCollection

        public static <T> String serializeUnorderedCollection​(@NotNull
                                                              Collection<T> collection)