com.jidesoft.grouper.date
Class DateGrouper

java.lang.Object
  extended by com.jidesoft.grouper.AbstractObjectGrouper
      extended by com.jidesoft.grouper.date.DateGrouper
All Implemented Interfaces:
ObjectGrouper
Direct Known Subclasses:
DateDayOfMonthGrouper, DateDayOfWeekGrouper, DateDayOfWeekInMonthGrouper, DateDayOfYearGrouper, DateMonthGrouper, DateQuarterGrouper, DateWeekOfMonthGrouper, DateWeekOfYearGrouper, DateYearGrouper

public abstract class DateGrouper
extends AbstractObjectGrouper

An abstract Grouper which can take data type such as Date, Calendar or Long and provide getCalendarFieldAsInt(Object,int) and getCalendarField(Object,int) methods to access the field of the Calendar.


Field Summary
protected static Calendar INSTANCE
           
 
Constructor Summary
DateGrouper()
           
 
Method Summary
static Object getCalendarField(Object value, int field)
           
static int getCalendarFieldAsInt(Object value, int field)
           
 Class<?> getType()
          Gets the group value type.
 
Methods inherited from class com.jidesoft.grouper.AbstractObjectGrouper
getComparatorContext, getConverterContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.jidesoft.grouper.ObjectGrouper
getName, getValue
 

Field Detail

INSTANCE

protected static Calendar INSTANCE
Constructor Detail

DateGrouper

public DateGrouper()
Method Detail

getCalendarField

public static Object getCalendarField(Object value,
                                      int field)

getCalendarFieldAsInt

public static int getCalendarFieldAsInt(Object value,
                                        int field)

getType

public Class<?> getType()
Description copied from interface: ObjectGrouper
Gets the group value type. It should be the type of the value that is returned from the getGroupValue.

Returns:
the group value type.


Copyright © 2012. All Rights Reserved.