]> source.dussan.org Git - poi.git/commitdiff
Fix generics warnings
authorNick Burch <nick@apache.org>
Fri, 18 Feb 2011 17:41:17 +0000 (17:41 +0000)
committerNick Burch <nick@apache.org>
Fri, 18 Feb 2011 17:41:17 +0000 (17:41 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1072080 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/poi/hssf/util/HSSFColor.java

index b640b37e1ced0dab03c860d7dde7c6a72a838329..bca0047dc3ec45840b4a3fcadb9d189d9f6bfb25 100644 (file)
@@ -53,14 +53,14 @@ public class HSSFColor implements Color {
      *
      * @return a hashtable containing all colors keyed by <tt>Integer</tt> excel-style palette indexes
      */
-    public final static Hashtable getIndexHash() {
+    public final static Hashtable<Integer,HSSFColor> getIndexHash() {
 
         return createColorsByIndexMap();
     }
 
-    private static Hashtable createColorsByIndexMap() {
+    private static Hashtable<Integer,HSSFColor> createColorsByIndexMap() {
         HSSFColor[] colors = getAllColors();
-        Hashtable result = new Hashtable(colors.length * 3 / 2);
+        Hashtable<Integer,HSSFColor> result = new Hashtable<Integer,HSSFColor>(colors.length * 3 / 2);
 
         for (int i = 0; i < colors.length; i++) {
             HSSFColor color = colors[i];
@@ -142,14 +142,14 @@ public class HSSFColor implements Color {
      *
      * @return a hashtable containing all colors keyed by String gnumeric-like triplets
      */
-    public final static Hashtable getTripletHash()
+    public final static Hashtable<String,HSSFColor> getTripletHash()
     {
         return createColorsByHexStringMap();
     }
 
-    private static Hashtable createColorsByHexStringMap() {
+    private static Hashtable<String,HSSFColor> createColorsByHexStringMap() {
         HSSFColor[] colors = getAllColors();
-        Hashtable result = new Hashtable(colors.length * 3 / 2);
+        Hashtable<String,HSSFColor> result = new Hashtable<String,HSSFColor>(colors.length * 3 / 2);
 
         for (int i = 0; i < colors.length; i++) {
             HSSFColor color = colors[i];