Here you can find the source of createCollection(X o)
public static <X> Collection<X> createCollection(X o)
//package com.java2s; import java.util.*; public class Main { public static <X> Collection<X> createCollection(X o) { return createList(o); }/*from w ww .java2s. c o m*/ public static <X> List<X> createList(X o) { List<X> c; if (o == null) { c = Collections.emptyList(); } else { c = new ArrayList<X>(1); c.add(o); } return c; } }