last = 0;
wrapped=true;
}
// If we never wrapped, we can safely return last as new index.
if (!wrapped) return new SnmpOid(last);
// We wrapped. We must look for an unused index.
for (int i=1;i < 0x00000000FFFFFFFFL;i++) {
if (++last > 0x00000000FFFFFFFFL) last = 1;
final SnmpOid testOid = new SnmpOid(last);
// Was this index already in use?
if (names == null) return testOid;
if (names.containsValue(testOid)) continue;