Copyright © 2011 Citra Technologies. All Rights Reserved.

com.citra.filter
Class NumberFilter

java.lang.Object
  extended by com.citra.filter.Filter
      extended by com.citra.filter.ComparisonFilter
          extended by com.citra.filter.NumberFilter
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
DoubleFilter, FloatFilter, IntegerFilter, LongFilter

public abstract class NumberFilter
extends ComparisonFilter

The superclass for filters that deal with Numbers.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.citra.filter.ComparisonFilter
comparison, EQ, GE, GT, LE, LT, NE
 
Fields inherited from class com.citra.filter.Filter
acceptNull
 
Constructor Summary
NumberFilter()
          Constructs a NumberFilter object.
 
Method Summary
abstract  boolean fromString(String str)
          Parses the supplied string to a Number and returns a boolean indicating if the parsing was successful.
 Object getFilterPattern()
          Returns the object used as the filter pattern.
abstract  Number getNumber()
          Returns the Number object which is set as the filter pattern.
 void setFilterPattern(Object filter)
          Sets an object as the filter pattern.
abstract  void setNumber(Number n)
          Assigns a new Number object as the filter pattern.
 
Methods inherited from class com.citra.filter.ComparisonFilter
getComparison, setComparison
 
Methods inherited from class com.citra.filter.Filter
accept, getAcceptNull, setAcceptNull
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NumberFilter

public NumberFilter()
Constructs a NumberFilter object.

Method Detail

fromString

public abstract boolean fromString(String str)
Parses the supplied string to a Number and returns a boolean indicating if the parsing was successful.

Parameters:
str - the string to parse to a Number
Returns:
true if the supplied string was successfully parsed, false otherwise.

getFilterPattern

public Object getFilterPattern()
Returns the object used as the filter pattern.

Specified by:
getFilterPattern in class Filter
Returns:
the object that is currently set as the filter pattern.

getNumber

public abstract Number getNumber()
Returns the Number object which is set as the filter pattern.

Returns:
the filter pattern as a Number

setFilterPattern

public void setFilterPattern(Object filter)
Sets an object as the filter pattern. Subclasses should provide an implementation that will probably first cast filter to the appropriate object.

Specified by:
setFilterPattern in class Filter
Parameters:
filter - the object to set as the filter pattern

setNumber

public abstract void setNumber(Number n)
Assigns a new Number object as the filter pattern.

Parameters:
n - the new filter pattern to assign as a Number.

Copyright © 2011 Citra Technologies. All Rights Reserved.