ewe.util
Class Range

java.lang.Object
  extended byewe.util.Range
All Implemented Interfaces:
Copyable

public class Range
extends Object
implements Copyable

A Range represents a consecutive sequence of indexes.


Field Summary
 int first
          This is the first index in the range.
 int last
          This is the last index in the range (inclusive).
 
Constructor Summary
Range(int first, int last)
           
 
Method Summary
 boolean equals(Object other)
          Returns if this object is considered equal to the other object.
 Object getCopy()
          Return a copy of this object.
 Range set(int first, int last)
           
 Range set(Range r)
           
 String toString()
          Return a String representation of this object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode
 

Field Detail

first

public int first
This is the first index in the range.


last

public int last
This is the last index in the range (inclusive).

Constructor Detail

Range

public Range(int first,
             int last)
Method Detail

set

public Range set(int first,
                 int last)

set

public Range set(Range r)

equals

public boolean equals(Object other)
Description copied from class: Object
Returns if this object is considered equal to the other object.

Overrides:
equals in class Object
Parameters:
other - Another object to compare to.
Returns:
true if this object is considered equal to the other object.

toString

public String toString()
Description copied from class: Object
Return a String representation of this object.

Overrides:
toString in class Object
Returns:
a String representing this object.

getCopy

public Object getCopy()
Description copied from interface: Copyable
Return a copy of this object.

Specified by:
getCopy in interface Copyable