summaryrefslogtreecommitdiff
path: root/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/SymbolLookup.java
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2012-06-27 18:20:18 +0200
committerMichael Stahl <mstahl@redhat.com>2012-06-29 22:03:02 +0200
commit30d4c3c7ce75ed2180a439c2a3526dae7f4660d5 (patch)
treea057e459dc9b975ed0b34bd4785b52acdd2f12b9 /xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/SymbolLookup.java
parentb9e203cb95e78782262c078891d4f0ac99850e1e (diff)
Java5 update - convert to using generics where feasible
Change-Id: I65b8a40aff54a1128d66e7c46bbcdea459bcc2ce
Diffstat (limited to 'xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/SymbolLookup.java')
-rw-r--r--xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/SymbolLookup.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/SymbolLookup.java b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/SymbolLookup.java
index 417f800725de..251a6e2869da 100644
--- a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/SymbolLookup.java
+++ b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/SymbolLookup.java
@@ -26,8 +26,8 @@ import java.util.HashMap;
*/
public abstract class SymbolLookup {
- protected HashMap stringToID = null;
- protected HashMap idToString = null;
+ protected HashMap<String, Integer> stringToID = null;
+ protected HashMap<Integer, String> idToString = null;
/**
* Perform lookup table specific initialization. This would typically entail loading values into
@@ -53,7 +53,7 @@ public abstract class SymbolLookup {
* @return The string associated with this identifier in the lookup table.
*/
public String getStringFromID(int id) {
- return (String)idToString.get(new Integer(id));
+ return idToString.get(new Integer(id));
}
/**
@@ -63,10 +63,10 @@ public abstract class SymbolLookup {
* @return The identifier associated with this string in the lookup table.
*/
public int getIDFromString(String symbol) throws UnsupportedFunctionException {
- Integer i = (Integer)stringToID.get(symbol);
+ Integer i = stringToID.get(symbol);
if (i == null)
throw new UnsupportedFunctionException("Token '" + symbol + "' not supported by Pocket Excel");
- return ((Integer)stringToID.get(symbol)).intValue();
+ return stringToID.get(symbol).intValue();
}
}