com.ibm.tws.objects.filter
Class LongRange

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

public class LongRange
extends AbstractRange

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

See Also:
Serialized Form

Field Summary
static java.lang.String COPYRIGHT
          Copyright.
 
Constructor Summary
LongRange(long limit, boolean isStart)
          Creates an "open" LongRange object, having only a start or end limit.
LongRange(long start, long end)
          Creates a "closed" LongRange 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.
 long getRangeEnd()
          Returns the range end limit.
 long 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

LongRange

public LongRange(long start,
                 long end)
Creates a "closed" LongRange 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.

LongRange

public LongRange(long limit,
                 boolean isStart)
Creates an "open" LongRange 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 long getRangeStart()
Returns the range start limit.

Returns:
The range start limit.

getRangeEnd

public long 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.