void clear() { for (Iterator i = map.keySet().iterator(); i.hasNext(); ) { ByteArray a = (ByteArray) i.next(); a.clear(); wrappers.push(a); } map.clear(); }
int contains(BytecodeBuffer b, int start, int end) { key.clear(); key.b = b; key.start = start; key.end = end; key.hash = 0; key.init(); Integer index = (Integer) map.get(key); return (index != null) ? index.intValue() : -1; }
int store(BytecodeBuffer b, int start, int end) { ByteArray a = wrappers.isEmpty() ? null : (ByteArray) wrappers.pop(); if (a == null) { a = newByteArray(); } a.clear(); a.b = b; a.start = start; a.end = end; a.init(); Integer index = IntegerPool.getNumber(map.size() + 1); map.put(a, index); return index.intValue(); }