List of usage examples for org.apache.commons.lang IntHashMap IntHashMap
public IntHashMap()
Constructs a new, empty hashtable with a default capacity and load factor, which is 20
and 0.75
respectively.
From source file:org.edc.sstone.CheckedException.java
public String getErrorMessageKey() { Object ret = null;//w w w . j av a 2s. c o m IntHashMap m = new IntHashMap(); m.put(PHONE_PROFILE_SILENT_MODE_ERROR, "audio.silent.error"); m.put(MODULE_READ_ERROR, "module.read.error"); m.put(MODULE_PROPERTIES_READ_ERROR, "module.properties.read.error"); ret = m.get(code); return (ret != null && ret instanceof String) ? (String) ret : "application.error"; }
From source file:org.edc.sstone.prefs.UserPreferences.java
private void updateRecordIndex(boolean closeAfterUpdate) throws RecordStoreException { if (recordIdMapping == null) { recordIdMapping = new IntHashMap(); }/*from w w w .ja va 2s. co m*/ try { open(); RecordEnumeration re = rms.enumerateRecords(null, null, false); while (re.hasNextElement()) { int rmsRecordId = re.nextRecordId(); byte[] record = rms.getRecord(rmsRecordId); recordIdMapping.put(getRecordId(record), new Integer(rmsRecordId)); } } finally { if (closeAfterUpdate) close(); } }