Class ListPartition<T>

    • Method Detail

      • of

        @Contract("_ -> new")
        @NotNull
        public static <T> @NotNull ListPartition<T> of​(List<? extends T> list)
        Method to receive the list to be partitioned.
        Type Parameters:
        T - List type
        Parameters:
        list - List to be partitioned.
        Returns:
        instance of ListPartition
      • into

        @Contract(value="_ -> this",
                  mutates="this")
        public ListPartition<T> into​(int sublistSize)
        Method used to get partition size.
        Parameters:
        sublistSize - The sub-list/ListPartition size.
        Returns:
        current instance of ListPartition
      • get

        @Contract(pure=true)
        @NotNull
        public @NotNull List<T> get​(int index)
        Specified by:
        get in interface List<T>
        Specified by:
        get in class AbstractList<List<? super T>>