@Override public boolean remove(int i) { boolean result = impl.remove(i); maybeChangeRepresentation(); return result; }
@Override public boolean add(int i) { boolean result = impl.add(i); if (result) { maybeChangeRepresentation(); } return result; }
@Override public boolean add(int i) { boolean result = impl.add(i); if (result) { maybeChangeRepresentation(); } return result; }
@Override public boolean remove(int i) { boolean result = impl.remove(i); maybeChangeRepresentation(); return result; }
@Override public boolean remove(int i) { boolean result = impl.remove(i); maybeChangeRepresentation(); return result; }
@Override public boolean add(int i) { boolean result = impl.add(i); if (result) { maybeChangeRepresentation(); } return result; }
@Override public boolean addAll(IntSet set) { if (set instanceof BitVectorIntSet && !(impl instanceof BitVectorIntSet)) { // change the representation before performing the operation impl = new BitVectorIntSet(impl); } boolean result = impl.addAll(set); if (result) { maybeChangeRepresentation(); } return result; }
@Override public boolean addAll(IntSet set) { if (set instanceof BitVectorIntSet && !(impl instanceof BitVectorIntSet)) { // change the representation before performing the operation impl = new BitVectorIntSet(impl); } boolean result = impl.addAll(set); if (result) { maybeChangeRepresentation(); } return result; }
@Override public boolean addAll(IntSet set) { if (set instanceof BitVectorIntSet && !(impl instanceof BitVectorIntSet)) { // change the representation before performing the operation impl = new BitVectorIntSet(impl); } boolean result = impl.addAll(set); if (result) { maybeChangeRepresentation(); } return result; }
@Override public boolean addAllInIntersection(IntSet other, IntSet filter) { if (other instanceof BitVectorIntSet && !(impl instanceof BitVectorIntSet)) { // change the representation before performing the operation impl = new BitVectorIntSet(impl); } boolean result = impl.addAllInIntersection(other, filter); if (result) { maybeChangeRepresentation(); } return result; }
@Override public boolean addAllInIntersection(IntSet other, IntSet filter) { if (other instanceof BitVectorIntSet && !(impl instanceof BitVectorIntSet)) { // change the representation before performing the operation impl = new BitVectorIntSet(impl); } boolean result = impl.addAllInIntersection(other, filter); if (result) { maybeChangeRepresentation(); } return result; }
@Override public boolean addAllInIntersection(IntSet other, IntSet filter) { if (other instanceof BitVectorIntSet && !(impl instanceof BitVectorIntSet)) { // change the representation before performing the operation impl = new BitVectorIntSet(impl); } boolean result = impl.addAllInIntersection(other, filter); if (result) { maybeChangeRepresentation(); } return result; }