Fix generics warnings

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1072080 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Nick Burch 2011-02-18 17:41:17 +00:00
parent 77fb5f43ee
commit 51ed90fc4a

View 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 * @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(); return createColorsByIndexMap();
} }
private static Hashtable createColorsByIndexMap() { private static Hashtable<Integer,HSSFColor> createColorsByIndexMap() {
HSSFColor[] colors = getAllColors(); 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++) { for (int i = 0; i < colors.length; i++) {
HSSFColor color = colors[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 * @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(); return createColorsByHexStringMap();
} }
private static Hashtable createColorsByHexStringMap() { private static Hashtable<String,HSSFColor> createColorsByHexStringMap() {
HSSFColor[] colors = getAllColors(); 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++) { for (int i = 0; i < colors.length; i++) {
HSSFColor color = colors[i]; HSSFColor color = colors[i];