for(Range r : ranges) add(r);
}
+ public Set(Iterable<Range> it) {
+ this();
+ for(Range r : it) add(r);
+ }
+
/**
* @param rs The set with which to union with this set.
* @return A new set that represents the union of this and the passed set.
return result;
}
+ public boolean containsAll(Range.Set rs) {
+ for(Range r : rs)
+ if (!contains(r)) return false;
+ return true;
+ }
+
public boolean equals(Object obj) {
if (obj instanceof Range.Set) {
Range.Set rs = (Range.Set) obj;