Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.sample.addressbook.controller.components.search
Class SearchRange  view SearchRange download SearchRange.java

java.lang.Object
  extended bycom.sample.addressbook.controller.components.search.SearchRange
All Implemented Interfaces:
SearchFilter, java.io.Serializable

public class SearchRange
extends java.lang.Object
implements SearchFilter, java.io.Serializable

Specifies the inclusive range of items to place in a search result.


Field Summary
private  int lowerBound
          The lower bound of the range.
private  int upperBound
          The upper bound of the range.
 
Constructor Summary
SearchRange(int setLowerBound, int setUpperBound)
          Creates an instance.
 
Method Summary
 int getLowerBound()
          Returns the lower bound of the range.
 int getUpperBound()
          Returns the upper bound of the range.
 boolean isFiltered(int number)
          Returns true if the item number is excluded from the search result.
 boolean isRetained(int number)
          Returns true if the item is in the range.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

lowerBound

private int lowerBound
The lower bound of the range.


upperBound

private int upperBound
The upper bound of the range.

Constructor Detail

SearchRange

public SearchRange(int setLowerBound,
                   int setUpperBound)
Creates an instance.

Method Detail

getLowerBound

public int getLowerBound()
Returns the lower bound of the range.


getUpperBound

public int getUpperBound()
Returns the upper bound of the range.


isRetained

public boolean isRetained(int number)
Returns true if the item is in the range.

Specified by:
isRetained in interface SearchFilter

isFiltered

public boolean isFiltered(int number)
Returns true if the item number is excluded from the search result.

Specified by:
isFiltered in interface SearchFilter