From: Erik V. <ev...@us...> - 2009-09-25 19:13:15
|
Update of /cvsroot/rails/18xx/rails/util In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv5549/rails/util Modified Files: Util.java Log Message: Rationalised Bank, removing statics Removed two unnecessary Util methods Index: Util.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/util/Util.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** Util.java 30 Jun 2008 20:35:30 -0000 1.14 --- Util.java 25 Sep 2009 19:13:01 -0000 1.15 *************** *** 30,47 **** } - /** Check if an object is an instance of a class - at runtime! */ - public static boolean isInstanceOf(Object o, Class<?> clazz) { - Class<?> c = o.getClass(); - while (c != null) { - if (c == clazz) return true; - c = c.getSuperclass(); - } - return false; - } - - public static String getClassShortName(Object object) { - return object.getClass().getName().replaceAll(".*\\.", ""); - } - public static int parseInt(String value) throws ConfigurationException { --- 30,33 ---- *************** *** 75,79 **** * Safely move objects from one holder to another, avoiding * ConcurrentModificationExceptions. ! * * @param from * @param to --- 61,65 ---- * Safely move objects from one holder to another, avoiding * ConcurrentModificationExceptions. ! * * @param from * @param to |