com.ibm.tws.objects.filter
Class IntegerRange

java.lang.Object
  extended bycom.ibm.tws.objects.filter.AbstractRange
      extended bycom.ibm.tws.objects.filter.IntegerRange
All Implemented Interfaces:
java.io.Serializable

public class IntegerRange
extends AbstractRange

This subclass of AbstractRange can hold a range of integer values, and can be set into a QueryFilter to retrieve results with the requested range on a selected integer field.

See Also:
Serialized Form

Field Summary
static java.lang.String COPYRIGHT
          Copyright.
 
Constructor Summary
IntegerRange(int limit, boolean isStart)
          Creates an "open" IntegerRange object, having only a start or end limit.
IntegerRange(int start, int end)
          Creates a "closed" IntegerRange object, having both a start and end limit.
 
Method Summary
 boolean equals(java.lang.Object object)
          Returns true if this range is equal to the given one.
 int getRangeEnd()
          Returns the range end limit.
 int getRangeStart()
          Returns the range start limit.
 int hashCode()
          Returns a hash code for this range.
 java.lang.String toString()
          Returns a compact representation of this range.
 
Methods inherited from class com.ibm.tws.objects.filter.AbstractRange
hasEnd, hasStart
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

COPYRIGHT

public static final java.lang.String COPYRIGHT
Copyright.

Constructor Detail

IntegerRange

public IntegerRange(int start,
                    int end)
Creates a "closed" IntegerRange object, having both a start and end limit.

Parameters:
start - The range start limit.
end - The range end limit.
Throws:
java.lang.IllegalArgumentException - The start limit is greater than the end limit.

IntegerRange

public IntegerRange(int limit,
                    boolean isStart)
Creates an "open" IntegerRange object, having only a start or end limit.

Parameters:
limit - The range start or end limit.
isStart - True if the range has only a start limit, false if it has only an end limit.
Method Detail

getRangeStart

public int getRangeStart()
Returns the range start limit.

Returns:
The range start limit.

getRangeEnd

public int getRangeEnd()
Returns the range end limit.

Returns:
The range end limit.

equals

public boolean equals(java.lang.Object object)
Returns true if this range is equal to the given one.

Overrides:
equals in class AbstractRange
Parameters:
object - The object to be compared with this one.
Returns:
True if this object equals to the given one.

hashCode

public int hashCode()
Returns a hash code for this range.

Overrides:
hashCode in class AbstractRange
Returns:
The object's hash code.

toString

public java.lang.String toString()
Returns a compact representation of this range.

Returns:
A compact representation of this range.


Copyright © 2005 IBM All Rights Reserved.