Class CollectionUtils


  • public final class CollectionUtils
    extends java.lang.Object
    Since:
    3.9.0
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <E> void addAllFromTo​(java.lang.Iterable<? extends E> items, java.util.Collection<? super E> collection)  
      static <E> java.util.HashSet<E> createHashSet​(E... elements)  
      static <E> int indexOfInstance​(java.util.List<E> list, E instance, int lastKnownIndex)  
      static java.lang.String join​(java.lang.Iterable<java.lang.String> collection, java.lang.String separator)  
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • addAllFromTo

        public static <E> void addAllFromTo​(@NotNull
                                            java.lang.Iterable<? extends E> items,
                                            @NotNull
                                            java.util.Collection<? super E> collection)
      • join

        @NotNull
        public static java.lang.String join​(@Nullable
                                            java.lang.Iterable<java.lang.String> collection,
                                            @NotNull
                                            java.lang.String separator)
      • createHashSet

        @NotNull
        public static <E> java.util.HashSet<E> createHashSet​(E... elements)
      • indexOfInstance

        public static <E> int indexOfInstance​(@NotNull
                                              java.util.List<E> list,
                                              @NotNull
                                              E instance,
                                              int lastKnownIndex)