code: public static Object ensureSize(Object list, int initialSize)
      {
          if (list==null)
              return new ArrayList(initialSize);
          if (list instanceof ArrayList)
              return list;
          List l= new ArrayList(initialSize);
          l.add(list);
          return l;    
      }
docs: /* ------------------------------------------------------------