Class ListUtils


  • public final class ListUtils
    extends Object
    • Method Detail

      • of

        @Contract("_ -> new")
        @SafeVarargs
        @NotNull
        public static <T> @NotNull List<T> of​(T... elements)
        Generate list from arguments
        Type Parameters:
        T - Generic list type
        Parameters:
        elements - All initial elements
        Returns:
        Returns an instance of list with all data
      • foreach

        public static <T> void foreach​(@NotNull
                                       @NotNull List<T> list,
                                       IAnyUtilsCallbacks.IForeach<T> callback)
        Foreach method
        Type Parameters:
        T - Generic type
        Parameters:
        list - Target list
        callback - Target execution callback