sclass AscendingOrderIntObjectMap {
new IntBuffer keys;
new L values;
void put(int key, A value) {
if (!keys.isEmpty() && last(keys) >= key)
fail("Ascending order fail: " + last(keys) + " / " + key);
keys.add(key);
values.add(value);
}
A get(int key) {
int i = intBufferBinarySearch(keys, key);
ret i >= 0 ? values.get(i) : null;
}
int size() { ret keys.size(); }
}