/** * Set the value of this to be the same as the value of set */ @Override public void copySet(IntSet set) { if (set instanceof DebuggingMutableIntSet) { DebuggingMutableIntSet db = (DebuggingMutableIntSet) set; primaryImpl.copySet(db.primaryImpl); secondaryImpl.copySet(db.secondaryImpl); assert primaryImpl.sameValue(secondaryImpl); } else { Assertions.UNREACHABLE(); } }
/** * Set the value of this to be the same as the value of set */ @Override public void copySet(IntSet set) { if (set instanceof DebuggingMutableIntSet) { DebuggingMutableIntSet db = (DebuggingMutableIntSet) set; primaryImpl.copySet(db.primaryImpl); secondaryImpl.copySet(db.secondaryImpl); assert primaryImpl.sameValue(secondaryImpl); } else { Assertions.UNREACHABLE(); } }
/** * Set the value of this to be the same as the value of set */ @Override public void copySet(IntSet set) { if (set instanceof DebuggingMutableIntSet) { DebuggingMutableIntSet db = (DebuggingMutableIntSet) set; primaryImpl.copySet(db.primaryImpl); secondaryImpl.copySet(db.secondaryImpl); assert primaryImpl.sameValue(secondaryImpl); } else { Assertions.UNREACHABLE(); } }
@Override public void copyState(T other) { if (V == null) { if (other.V == null) { return; } else { V = IntSetUtil.getDefaultIntSetFactory().makeCopy(other.V); return; } } else { if (other.V != null) { V.copySet(other.V); } } }
@Override public void copyState(T other) { if (V == null) { if (other.V == null) { return; } else { V = IntSetUtil.getDefaultIntSetFactory().makeCopy(other.V); return; } } else { if (other.V != null) { V.copySet(other.V); } } }
@Override public void copyState(T other) { if (V == null) { if (other.V == null) { return; } else { V = IntSetUtil.getDefaultIntSetFactory().makeCopy(other.V); return; } } else { if (other.V != null) { V.copySet(other.V); } } }
@Override public void copySet(IntSet set) { if (set == null) { throw new IllegalArgumentException("null set"); } if (set instanceof BimodalMutableIntSet) { impl = IntSetUtil.makeMutableCopy(((BimodalMutableIntSet) set).impl); } else if (sameRepresentation(impl, set)) { // V and other.V use the same representation. update in place. impl.copySet(set); } else if (set instanceof BitVectorIntSet || set instanceof SparseIntSet) { // other.V has a different representation. make a new copy impl = IntSetUtil.makeMutableCopy(set); } else if (set instanceof MutableSharedBitVectorIntSet) { impl = IntSetUtil.makeMutableCopy(((MutableSharedBitVectorIntSet) set).makeSparseCopy()); } else { Assertions.UNREACHABLE("Unexpected type " + set.getClass()); } assert impl instanceof BitVectorIntSet || impl instanceof MutableSparseIntSet; }
@Override public void copySet(IntSet set) { if (set == null) { throw new IllegalArgumentException("null set"); } if (set instanceof BimodalMutableIntSet) { impl = IntSetUtil.makeMutableCopy(((BimodalMutableIntSet) set).impl); } else if (sameRepresentation(impl, set)) { // V and other.V use the same representation. update in place. impl.copySet(set); } else if (set instanceof BitVectorIntSet || set instanceof SparseIntSet) { // other.V has a different representation. make a new copy impl = IntSetUtil.makeMutableCopy(set); } else if (set instanceof MutableSharedBitVectorIntSet) { impl = IntSetUtil.makeMutableCopy(((MutableSharedBitVectorIntSet) set).makeSparseCopy()); } else { Assertions.UNREACHABLE("Unexpected type " + set.getClass()); } assert impl instanceof BitVectorIntSet || impl instanceof MutableSparseIntSet; }
@Override public void copySet(IntSet set) { if (set == null) { throw new IllegalArgumentException("null set"); } if (set instanceof BimodalMutableIntSet) { impl = IntSetUtil.makeMutableCopy(((BimodalMutableIntSet) set).impl); } else if (sameRepresentation(impl, set)) { // V and other.V use the same representation. update in place. impl.copySet(set); } else if (set instanceof BitVectorIntSet || set instanceof SparseIntSet) { // other.V has a different representation. make a new copy impl = IntSetUtil.makeMutableCopy(set); } else if (set instanceof MutableSharedBitVectorIntSet) { impl = IntSetUtil.makeMutableCopy(((MutableSharedBitVectorIntSet) set).makeSparseCopy()); } else { Assertions.UNREACHABLE("Unexpected type " + set.getClass()); } assert impl instanceof BitVectorIntSet || impl instanceof MutableSparseIntSet; }
previousReceivers.copySet(value);
previousReceivers.copySet(value);