Class ListBuilder<E>
java.lang.Object
com.kingsrook.qqq.backend.core.utils.collections.ListBuilder<E>
List.of is "great", but annoying because it makes unmodifiable lists...
So, replace it with this, which returns ArrayLists, which "don't suck"
Can use it 3 ways:
ListBuilder.of(value, value2, ...) => List (an ArrayList)
ListBuilder.of(SomeList::new).with(value).with(value2)...build() => SomeList (the type you specify)
new ListBuilder..with(value).with(value2)...build() => List (an ArrayList - for when you have more than 10 values...)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
static <E> List
<E> of
(E e1) static <E> List
<E> of
(E e1, E e2) static <E> List
<E> of
(E e1, E e2, E e3) static <E> List
<E> of
(E e1, E e2, E e3, E e4) static <E> List
<E> of
(E e1, E e2, E e3, E e4, E e5) static <E> List
<E> of
(E e1, E e2, E e3, E e4, E e5, E e6) static <E> List
<E> of
(E e1, E e2, E e3, E e4, E e5, E e6, E e7) static <E> List
<E> of
(E e1, E e2, E e3, E e4, E e5, E e6, E e7, E e8) static <E> List
<E> of
(E e1, E e2, E e3, E e4, E e5, E e6, E e7, E e8, E e9) static <E> List
<E> of
(E e1, E e2, E e3, E e4, E e5, E e6, E e7, E e8, E e9, E e10)
-
Constructor Details
-
ListBuilder
public ListBuilder()Constructor -
ListBuilder
-
-
Method Details
-
with
-
build
-
of
-
of
-
of
-
of
-
of
-
of
-
of
-
of
-
of
-
of
-