JIDE 3.5.15

com.jidesoft.filter
Class YearFilter<T>

java.lang.Object
  extended by com.jidesoft.filter.AbstractFilter<T>
      extended by com.jidesoft.filter.DateOrCalendarFilter<T>
          extended by com.jidesoft.filter.YearFilter<T>
All Implemented Interfaces:
Filter<T>, ObjectGrouperSupport, Serializable, Cloneable

public class YearFilter<T>
extends DateOrCalendarFilter<T>

A Filter returns false in DateOrCalendarFilter.isValueFiltered(Object) only if the input value is within in the year as specified. It will return false if the Calendar or the Date in that year, regardless others.

Since:
3.4.3
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface com.jidesoft.filter.Filter
ALL, CUSTOM, NULL, SEPARATOR
 
Constructor Summary
YearFilter()
          Creates a YearFilter.
YearFilter(int year)
          Creates a YearFilter for a particular year.
 
Method Summary
 boolean equals(Object obj)
           
 int getYear()
          Gets the year.
 void setYear(int year)
          Sets the year.
 boolean stricterThan(Filter inputFilter)
          Check if this filter is stricter than the input filter while the two filters are with the same class.
 
Methods inherited from class com.jidesoft.filter.DateOrCalendarFilter
getExpectedDataTypes, isDateFiltered, isValueFiltered
 
Methods inherited from class com.jidesoft.filter.AbstractFilter
addFilterListener, clone, fireFilterChanged, fireFilterContentChanged, fireFilterDisabled, fireFilterEnabled, fireFilterNameChanged, getConditionString, getFilterFactory, getFilterFactoryName, getFilterListeners, getName, getObjectGrouper, getObjectGrouperName, getPreference, isEnabled, isFilterValid, removeFilterListener, setEnabled, setFilterFactory, setFilterFactoryName, setName, setObjectGrouper, setObjectGrouperName, setPreference
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

YearFilter

public YearFilter()
Creates a YearFilter. The actual year will be set later using setYear method.


YearFilter

public YearFilter(int year)
Creates a YearFilter for a particular year.

Parameters:
year - the year
Method Detail

getYear

public int getYear()
Gets the year.

Returns:
the year.

setYear

public void setYear(int year)
Sets the year.

Parameters:
year - the year

stricterThan

public boolean stricterThan(Filter inputFilter)
Check if this filter is stricter than the input filter while the two filters are with the same class.

Specified by:
stricterThan in interface Filter<T>
Overrides:
stricterThan in class DateOrCalendarFilter<T>
Parameters:
inputFilter - the input filter
Returns:
true if the year of the two filters are same. Otherwise false.

equals

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

JIDE 3.5.15