private static Hashtable<String,HSSFColor> createColorsByHexStringMap() { HSSFColor[] colors = getAllColors(); Hashtable<String,HSSFColor> result = new Hashtable<String,HSSFColor>(colors.length * 3 / 2); for (int i = 0; i < colors.length; i++) { HSSFColor color = colors[i]; String hexString = color.getHexString(); if (result.containsKey(hexString)) { HSSFColor other = (HSSFColor)result.get(hexString); throw new RuntimeException( "Dup color hexString (" + hexString + ") for color (" + color.getClass().getName() + ") - " + " already taken by (" + other.getClass().getName() + ")" ); } result.put(hexString, color); } return result; }
private static Hashtable<String,HSSFColor> createColorsByHexStringMap() { HSSFColor[] colors = getAllColors(); Hashtable<String,HSSFColor> result = new Hashtable<String,HSSFColor>(colors.length * 3 / 2); for (int i = 0; i < colors.length; i++) { HSSFColor color = colors[i]; String hexString = color.getHexString(); if (result.containsKey(hexString)) { HSSFColor other = (HSSFColor)result.get(hexString); throw new RuntimeException( "Dup color hexString (" + hexString + ") for color (" + color.getClass().getName() + ") - " + " already taken by (" + other.getClass().getName() + ")" ); } result.put(hexString, color); } return result; }
private static Hashtable<Integer,HSSFColor> createColorsByIndexMap() { HSSFColor[] colors = getAllColors(); Hashtable<Integer,HSSFColor> result = new Hashtable<Integer,HSSFColor>(colors.length * 3 / 2);
private static Hashtable<Integer,HSSFColor> createColorsByIndexMap() { HSSFColor[] colors = getAllColors(); Hashtable<Integer,HSSFColor> result = new Hashtable<Integer,HSSFColor>(colors.length * 3 / 2);