I\'m looking for a static method in the Java core libraries or some other commonly used dependency — preferably one of Apache — that does the following:
public s
Immutable list in guava
public static ImmutableList of(E element)
Returns an immutable list containing a single element. This list behaves and performs comparably to Collections.singleton(T), but will not accept a null element. It is preferable mainly for consistency and maintainability of your code.