/* * GameUtilities.java * * Created on June 29, 2003, 11:00 AM */ package gamekeeper2a; /** Miscellaneous static methods for general use. * */ public class GameUtilities { /** Purely for testing. * @param args the command line arguments */ public static void main(String[] args) { } /** Print the contents of an array of any type of objects, one per line. * */ public static void printArray(Object[] anyArray) { for (int line = 0; line < anyArray.length; line++) { System.out.println(anyArray[line].toString()); } } /** Print the contents of an ArrayList of any type of objects, one per line. * */ public static void printArray(java.util.List anyList) { java.util.Iterator listIter = anyList.iterator(); while (listIter.hasNext()) { System.out.println(listIter.next().toString()); } } }