public boolean sameValue(IntSetVariable other) { if (V == null) { return (other.V == null); } else { if (other.V == null) { return false; } else { return V.sameValue(other.V); } } }
public boolean sameValue(IntSetVariable other) { if (V == null) { return (other.V == null); } else { if (other.V == null) { return false; } else { return V.sameValue(other.V); } } }
public boolean sameValue(IntSetVariable other) { if (V == null) { return (other.V == null); } else { if (other.V == null) { return false; } else { return V.sameValue(other.V); } } }
@Override public boolean sameValue(IntSet that) { return impl.sameValue(that); }
@Override public boolean sameValue(IntSet that) { return impl.sameValue(that); }
@Override public boolean sameValue(IntSet that) { return impl.sameValue(that); }
private void assertEquiv() { assert primaryImpl.sameValue(secondaryImpl); }
private void assertEquiv() { assert primaryImpl.sameValue(secondaryImpl); }
private void assertEquiv() { assert primaryImpl.sameValue(secondaryImpl); }
/** * @return true iff {@code this} has the same value as {@code that}. */ @Override public boolean sameValue(IntSet that) { if (that instanceof DebuggingMutableIntSet) { DebuggingMutableIntSet db = (DebuggingMutableIntSet) that; boolean ppr = primaryImpl.sameValue(db.primaryImpl); boolean ssr = secondaryImpl.sameValue(db.secondaryImpl); assert ppr == ssr; return ppr; } else { Assertions.UNREACHABLE(); return false; } }
/** * @return true iff {@code this} has the same value as {@code that}. */ @Override public boolean sameValue(IntSet that) { if (that instanceof DebuggingMutableIntSet) { DebuggingMutableIntSet db = (DebuggingMutableIntSet) that; boolean ppr = primaryImpl.sameValue(db.primaryImpl); boolean ssr = secondaryImpl.sameValue(db.secondaryImpl); assert ppr == ssr; return ppr; } else { Assertions.UNREACHABLE(); return false; } }
/** * @return true iff {@code this} has the same value as {@code that}. */ @Override public boolean sameValue(IntSet that) { if (that instanceof DebuggingMutableIntSet) { DebuggingMutableIntSet db = (DebuggingMutableIntSet) that; boolean ppr = primaryImpl.sameValue(db.primaryImpl); boolean ssr = secondaryImpl.sameValue(db.secondaryImpl); assert ppr == ssr; return ppr; } else { Assertions.UNREACHABLE(); return false; } }
@Override public DebuggingMutableIntSet makeCopy(IntSet x) throws UnimplementedError { if (x == null) { throw new IllegalArgumentException("null x"); } if (x instanceof DebuggingMutableIntSet) { DebuggingMutableIntSet db = (DebuggingMutableIntSet) x; MutableIntSet pr = primary.makeCopy(db.primaryImpl); MutableIntSet sr = secondary.makeCopy(db.secondaryImpl); assert pr.sameValue(db.primaryImpl); assert sr.sameValue(db.secondaryImpl); assert pr.sameValue(sr); return new DebuggingMutableIntSet(pr, sr); } else { Assertions.UNREACHABLE(); return null; } }
@Override public DebuggingMutableIntSet makeCopy(IntSet x) throws UnimplementedError { if (x == null) { throw new IllegalArgumentException("null x"); } if (x instanceof DebuggingMutableIntSet) { DebuggingMutableIntSet db = (DebuggingMutableIntSet) x; MutableIntSet pr = primary.makeCopy(db.primaryImpl); MutableIntSet sr = secondary.makeCopy(db.secondaryImpl); assert pr.sameValue(db.primaryImpl); assert sr.sameValue(db.secondaryImpl); assert pr.sameValue(sr); return new DebuggingMutableIntSet(pr, sr); } else { Assertions.UNREACHABLE(); return null; } }
/** * 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(); } }
/** * Intersect this with another set. */ @Override public void intersectWith(IntSet set) { if (set instanceof DebuggingMutableIntSet) { DebuggingMutableIntSet db = (DebuggingMutableIntSet) set; primaryImpl.intersectWith(db.primaryImpl); secondaryImpl.intersectWith(db.secondaryImpl); if (!primaryImpl.sameValue(secondaryImpl)) assert false : this + " (" + primaryImpl.size() + ", " + secondaryImpl.size() + ") inconsistent after intersecting with " + set; } else { Assertions.UNREACHABLE(); } }
/** * Intersect this with another set. */ @Override public void intersectWith(IntSet set) { if (set instanceof DebuggingMutableIntSet) { DebuggingMutableIntSet db = (DebuggingMutableIntSet) set; primaryImpl.intersectWith(db.primaryImpl); secondaryImpl.intersectWith(db.secondaryImpl); if (!primaryImpl.sameValue(secondaryImpl)) assert false : this + " (" + primaryImpl.size() + ", " + secondaryImpl.size() + ") inconsistent after intersecting with " + set; } else { Assertions.UNREACHABLE(); } }
/** * Intersect this with another set. */ @Override public void intersectWith(IntSet set) { if (set instanceof DebuggingMutableIntSet) { DebuggingMutableIntSet db = (DebuggingMutableIntSet) set; primaryImpl.intersectWith(db.primaryImpl); secondaryImpl.intersectWith(db.secondaryImpl); if (!primaryImpl.sameValue(secondaryImpl)) assert false : this + " (" + primaryImpl.size() + ", " + secondaryImpl.size() + ") inconsistent after intersecting with " + set; } else { Assertions.UNREACHABLE(); } }