info.jonclark.lang
Class IntRange

java.lang.Object
  extended by info.jonclark.lang.IntRange
All Implemented Interfaces:
Comparable<IntRange>

public class IntRange
extends Object
implements Comparable<IntRange>

This class holds 2 integers. Simple, right?


Field Summary
 int first
           
 int last
           
 
Constructor Summary
IntRange(int first, int last)
           
 
Method Summary
 int compareTo(IntRange o)
           
 boolean equals(Object o)
           
 boolean isInRange(int n)
           
 int length()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

first

public int first

last

public int last
Constructor Detail

IntRange

public IntRange(int first,
                int last)
Method Detail

length

public int length()

isInRange

public boolean isInRange(int n)

compareTo

public int compareTo(IntRange o)
Specified by:
compareTo in interface Comparable<IntRange>

equals

public boolean equals(Object o)
Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object