IdBitSet () { try { IdBitSet clone = (IdBitSet)super.clone(); if (myBitMask.length != myLastUsedSlot + 1) { // trim to size myBitMask = Arrays.copyOf(myBitMask, myLastUsedSlot + 1); } clone.myBitMask = myBitMask.clone(); return clone; } catch (CloneNotSupportedException ex) { Logger.getInstance(getClass().getName()).error(ex); return null; } }