/** * Returns a new Alternator for the specified list with the specified * automatic shifting preference. * * @param auto See {@link Alternator#setAuto(boolean auto)}. * @param list The list of elements to alternate. * @return alternator */ public Alternator make(boolean auto, Object... list) { if (list == null || list.length == 0) { return null; } else if (list.length == 1 && list[0] instanceof Collection && ((Collection)list[0]).isEmpty()) { return null; } return new Alternator(auto, list); }