Lines Matching defs:IntervalSet

52 public class IntervalSet implements IntSet {
53 public static final IntervalSet COMPLETE_SET = IntervalSet.of(0,Label.MAX_CHAR_VALUE);
59 public IntervalSet() {
63 public IntervalSet(List<Interval> intervals) {
68 public static IntervalSet of(int a) {
69 IntervalSet s = new IntervalSet();
75 public static IntervalSet of(int a, int b) {
76 IntervalSet s = new IntervalSet();
191 if ( !(set instanceof IntervalSet) ) {
194 ") to IntervalSet");
196 IntervalSet other = (IntervalSet)set;
206 return this.complement(IntervalSet.of(minElement,maxElement));
219 if ( !(vocabulary instanceof IntervalSet ) ) {
220 throw new IllegalArgumentException("can't complement with non IntervalSet ("+
223 IntervalSet vocabularyIS = ((IntervalSet)vocabulary);
226 IntervalSet compl = new IntervalSet();
234 IntervalSet s = IntervalSet.of(0, first.a-1);
235 IntervalSet a = (IntervalSet)s.and(vocabularyIS);
241 IntervalSet s = IntervalSet.of(previous.b+1, current.a-1);
242 IntervalSet a = (IntervalSet)s.and(vocabularyIS);
248 IntervalSet s = IntervalSet.of(last.b+1, maxElement);
249 IntervalSet a = (IntervalSet)s.and(vocabularyIS);
267 return this.and(((IntervalSet)other).complement(COMPLETE_SET));
279 if ( other==null || !(other instanceof IntervalSet) ) {
283 IntervalSet diff = new IntervalSet();
287 ListIterator otherIter = ((IntervalSet)other).intervals.listIterator();
391 IntervalSet o = new IntervalSet();
404 if ( other==null ) { //|| !(other instanceof IntervalSet) ) {
409 ArrayList theirIntervals = (ArrayList)((IntervalSet)other).intervals;
410 IntervalSet intersection = null;
431 intersection = new IntervalSet();
439 intersection = new IntervalSet();
447 intersection = new IntervalSet();
466 return new IntervalSet();
552 if ( obj==null || !(obj instanceof IntervalSet) ) {
555 IntervalSet other = (IntervalSet)obj;
683 throw new NoSuchMethodError("IntervalSet.remove() unimplemented");