From: Tim P <ti...@us...> - 2008-03-19 15:15:30
|
Update of /cvsroot/webmacro/webmacro/src/org/webmacro/servlet In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv32573/src/org/webmacro/servlet Modified Files: ListUtil.java Log Message: Checkstyle: make final, simplify catch/return Index: ListUtil.java =================================================================== RCS file: /cvsroot/webmacro/webmacro/src/org/webmacro/servlet/ListUtil.java,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** ListUtil.java 18 Mar 2008 20:04:42 -0000 1.13 --- ListUtil.java 19 Mar 2008 15:15:27 -0000 1.14 *************** *** 42,50 **** * @see ListTool */ ! public class ListUtil { /** ! * Private constructor for a singleton class */ private ListUtil () --- 42,50 ---- * @see ListTool */ ! public final class ListUtil { /** ! * Private constructor for a singleton class. */ private ListUtil () *************** *** 63,68 **** /** - * - * @param o * @return true if the argument implements the java.util.List interface, false otherwise. */ --- 63,66 ---- *************** *** 74,78 **** /** - * @param o * @return true if the argument is an array, otherwise false. */ --- 72,75 ---- *************** *** 84,88 **** /** - * @param arg * @return false if the argument is a list or an array with at least one element, * true otherwise. --- 81,84 ---- *************** *** 178,184 **** /** * Allows access to elements in an array by position. Index is zero based. - * - * @param oa - * @param pos */ public static Object getItem (Object[] oa, int pos) --- 174,177 ---- *************** *** 193,199 **** /** * Allows access to elements in a List by position. Index is zero based. - * - * @param list - * @param pos */ public static Object getItem (List list, int pos) --- 186,189 ---- *************** *** 222,226 **** /** - * @param oa * @return number of elements in array argument */ --- 212,215 ---- *************** *** 231,235 **** /** - * @param list * @return number of elements in List argument */ --- 220,223 ---- *************** *** 248,253 **** /** - * @param list - * @param o * @return true if List argument contains the object argument, else false */ --- 236,239 ---- *************** *** 258,263 **** /** - * @param oa - * @param o * @return true if Array argument contains the object argument, else false */ --- 244,247 ---- *************** *** 268,273 **** /** - * @param arr - * @param o * @return true if array argument contains the object argument, else false */ --- 252,255 ---- *************** *** 699,703 **** } ! /** create a new ArrayList */ public static ArrayList create () { --- 681,685 ---- } ! /** Create a new ArrayList. */ public static ArrayList create () { *************** *** 705,709 **** } ! /** create a new ArrayList with the specified capacity */ public static ArrayList create (int capacity) { --- 687,691 ---- } ! /** Create a new ArrayList with the specified capacity. */ public static ArrayList create (int capacity) { *************** *** 711,715 **** } ! /** append one list to the end of another and return the expanded list. * If the first list is not expandable, return a new expandable list * with the elements of each list appended --- 693,698 ---- } ! /** ! * Append one list to the end of another and return the expanded list. * If the first list is not expandable, return a new expandable list * with the elements of each list appended *************** *** 726,739 **** catch (Exception e) { } - - // create a new list - List l = new ArrayList(((l1.size() + l2.size()) * 2) + 10); - l.addAll(l1); - l.addAll(l2); - return l; } ! /** create a new list (ArrayList) with all the elements in the supplied list */ public static List copy (Object o) { --- 709,721 ---- catch (Exception e) { + // create a new list + List l = new ArrayList(((l1.size() + l2.size()) * 2) + 10); + l.addAll(l1); + l.addAll(l2); + return l; } } ! /** Create a new list (ArrayList) with all the elements in the supplied list. */ public static List copy (Object o) { *************** *** 743,747 **** } ! /** test harness */ public static void main (String[] args) { --- 725,729 ---- } ! /** Test harness. */ public static void main (String[] args) { |