edu.washington.cs.knowitall.commonlib
Class RangeSet

java.lang.Object
  extended by edu.washington.cs.knowitall.commonlib.AbstractRange
      extended by edu.washington.cs.knowitall.commonlib.RangeSet
All Implemented Interfaces:
Serializable

public class RangeSet
extends AbstractRange
implements Serializable

An immutable class that represent an interval.

Author:
michael
See Also:
Serialized Form

Constructor Summary
RangeSet(Range[] ranges)
           
 
Method Summary
 boolean contains(int i)
           
 boolean contains(Range otherRange)
           
 int getEnd()
           
static RangeSet getLeft(RangeSet range1, RangeSet range2)
           
static RangeSet getRight(RangeSet range1, RangeSet range2)
           
 int getStart()
           
 boolean isEmpty()
           
 String toString()
           
 
Methods inherited from class edu.washington.cs.knowitall.commonlib.AbstractRange
isLeftOf, isRightOf, startsLeftOf, startsRightOf
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RangeSet

public RangeSet(Range[] ranges)
Method Detail

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in class AbstractRange

getStart

public int getStart()
Specified by:
getStart in class AbstractRange

getEnd

public int getEnd()
Specified by:
getEnd in class AbstractRange

contains

public boolean contains(int i)
Specified by:
contains in class AbstractRange

contains

public boolean contains(Range otherRange)
Specified by:
contains in class AbstractRange

getLeft

public static RangeSet getLeft(RangeSet range1,
                               RangeSet range2)

getRight

public static RangeSet getRight(RangeSet range1,
                                RangeSet range2)

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2012 University of Washington CSE. All Rights Reserved.