@Test void testArray2List_NullInput() { Object input[] = null; Object list = ArrayUtils.asMutableList(input); assertNotNull(list); assertTrue(list instanceof List); assertEquals(0, LazyList.size(list)); }
public static int size(Object list) { if (list == null) return 0; if (list instanceof List) return ((List<?>) list).size(); return 1; }
LazyList implements Cloneable, Serializable { public static int size(Object list) { if (list == null) return 0; if (list instanceof List) return ((List<?>) list).size(); return 1; } }
LazyList implements Cloneable, Serializable { public static int size(Object list) { if (list == null) return 0; if (list instanceof List) return ((List<?>) list).size(); return 1; } private  LazyList(); }
LazyList implements Cloneable, Serializable { public static int size(Object list) { if (list == null) return 0; if (list instanceof List) return ((List<?>) list).size(); return 1; } private  LazyList(); @SuppressWarnings("unchecked") static Object add(Object list, Object item); @SuppressWarnings("unchecked") static Object add(Object list, int index, Object item); static Object addCollection(Object list, Collection<?> collection); static Object addArray(Object list, Object[] array); static Object ensureSize(Object list, int initialSize); static Object remove(Object list, Object o); static Object remove(Object list, int i); static List<E> getList(Object list); @SuppressWarnings("unchecked") static List<E> getList(Object list, boolean nullForEmpty); static boolean hasEntry(Object list); static boolean isEmpty(Object list); static String[] toStringArray(Object list); static Object toArray(Object list, Class<?> clazz); static int size(Object list); @SuppressWarnings("unchecked") static E get(Object list, int i); static boolean contains(Object list, Object item); static Object clone(Object list); static String toString(Object list); @SuppressWarnings("unchecked") static Iterator<E> iterator(Object list); @SuppressWarnings("unchecked") static ListIterator<E> listIterator(Object list); }
LazyList implements Cloneable, Serializable { public static int size(Object list) { if (list == null) return 0; if (list instanceof List) return ((List<?>) list).size(); return 1; } private  LazyList(); @SuppressWarnings("unchecked") static Object add(Object list, Object item); @SuppressWarnings("unchecked") static Object add(Object list, int index, Object item); static Object addCollection(Object list, Collection<?> collection); static Object addArray(Object list, Object[] array); static Object ensureSize(Object list, int initialSize); static Object remove(Object list, Object o); static Object remove(Object list, int i); static List<E> getList(Object list); @SuppressWarnings("unchecked") static List<E> getList(Object list, boolean nullForEmpty); static boolean hasEntry(Object list); static boolean isEmpty(Object list); static String[] toStringArray(Object list); static Object toArray(Object list, Class<?> clazz); static int size(Object list); @SuppressWarnings("unchecked") static E get(Object list, int i); static boolean contains(Object list, Object item); static Object clone(Object list); static String toString(Object list); @SuppressWarnings("unchecked") static Iterator<E> iterator(Object list); @SuppressWarnings("unchecked") static ListIterator<E> listIterator(Object list);  }