@Test public void testToString() { StringLongMapping mapping = new StringLongMapping(); long hash = mapping.add("foo"); assertEquals("foo", mapping.toString(hash)); }
public String toString(long numericID) { String id = null; Lock readLock = lock.readLock(); readLock.lock(); try { id = reverseMapping.get(numericID); } finally { readLock.unlock(); } return id == null ? Long.toString(numericID) : id; }
StringLongMapping { public String toString(long numericID) { String id = null; Lock readLock = lock.readLock(); readLock.lock(); try { id = reverseMapping.get(numericID); } finally { readLock.unlock(); } return id == null ? Long.toString(numericID) : id; } }
StringLongMapping { public String toString(long numericID) { String id = null; Lock readLock = lock.readLock(); readLock.lock(); try { id = reverseMapping.get(numericID); } finally { readLock.unlock(); } return id == null ? Long.toString(numericID) : id; } StringLongMapping(); }
StringLongMapping { public String toString(long numericID) { String id = null; Lock readLock = lock.readLock(); readLock.lock(); try { id = reverseMapping.get(numericID); } finally { readLock.unlock(); } return id == null ? Long.toString(numericID) : id; } StringLongMapping(); static long toLong(String id); long add(String id); void addMapping(String id, long numericID); String toString(long numericID); LongObjectMap<String> getReverseMapping(); ReadWriteLock getLock(); }
StringLongMapping { public String toString(long numericID) { String id = null; Lock readLock = lock.readLock(); readLock.lock(); try { id = reverseMapping.get(numericID); } finally { readLock.unlock(); } return id == null ? Long.toString(numericID) : id; } StringLongMapping(); static long toLong(String id); long add(String id); void addMapping(String id, long numericID); String toString(long numericID); LongObjectMap<String> getReverseMapping(); ReadWriteLock getLock();  }