Warum hat Guavas ImmutableList so viele überladene () Methoden?

Ich war gerade auf Guava'sImmutableList und mir ist aufgefallen, dass dieof() -Methode wurde 12 Mal überladen.

Es sieht für mich so aus, als ob sie nur Folgendes brauchten:

static <E> ImmutableList<E> of();
static <E> ImmutableList<E> of(E element); // not even necessary
static <E> ImmutableList<E> of(E... elements);

Was ist der Grund für so viele ähnliche Variationen?

Antworten auf die Frage(6)

Ihre Antwort auf die Frage