/** * Add the integer value <code>b</code> to this DependencySet. * * @param b */ public void add(final int b) { _depends.add(b); }
/** * @param b * @return true if <code>b</code> is in this set. */ public boolean contains(final int b) { return _depends.contains(b); }
@Override public void addAll(final IntSet values) { if (values instanceof BitIntSet) bits.or(((BitIntSet) values).bits); else { final IntIterator i = values.iterator(); while (i.hasNext()) add(i.next()); } }
/** * {@inheritDoc} */ @Override public IntSet union(final IntSet values) { final IntSet newSet = copy(); newSet.addAll(values); return newSet; }
/** * @param explain * @param doExplanation * @return the union as dependencySet */ public DependencySet union(final Set<ATermAppl> explain, final boolean doExplanation) { if (!doExplanation || explain.isEmpty()) return this; return new DependencySet(_branch, _depends.copy(), SetUtils.union(_explain, explain)); }
/** * @return the number of elements in this set. */ public int size() { return _depends.size(); }
/** * Remove the integer value <code>b</code> from this DependencySet. * * @param b */ public void remove(final int b) { _depends.remove(b); }
/** * @param ds * @param doExplanation * @return a new DependencySet and all the elements of <code>this</code> and <code>ds</code>. */ public DependencySet union(final DependencySet ds, final boolean doExplanation) { final IntSet newDepends = _depends.union(ds._depends); final Set<ATermAppl> newExplain = doExplanation ? // SetUtils.union(_explain, ds._explain) : // Collections.emptySet(); return new DependencySet(_branch, newDepends, newExplain); }
@Override public void addAll(final IntSet values) { if (values instanceof BitIntSet) bits.or(((BitIntSet) values).bits); else { final IntIterator i = values.iterator(); while (i.hasNext()) add(i.next()); } }
@Override public IntSet union(final IntSet values) { final IntSet newSet = copy(); newSet.addAll(values); return newSet; }
/** * @param explain * @param doExplanation * @return the union as dependencySet */ public DependencySet union(final Set<ATermAppl> explain, final boolean doExplanation) { if (!doExplanation || explain.isEmpty()) return this; return new DependencySet(_branch, _depends.copy(), SetUtils.union(_explain, explain)); }
/** * @return the number of elements in this set. */ public int size() { return _depends.size(); }
/** * Remove the integer value <code>b</code> from this DependencySet. * * @param b */ public void remove(final int b) { _depends.remove(b); }
/** * @param ds * @param doExplanation * @return a new DependencySet and all the elements of <code>this</code> and <code>ds</code>. */ public DependencySet union(final DependencySet ds, final boolean doExplanation) { final IntSet newDepends = _depends.union(ds._depends); final Set<ATermAppl> newExplain = doExplanation ? // SetUtils.union(_explain, ds._explain) : // Collections.emptySet(); return new DependencySet(_branch, newDepends, newExplain); }