JIDE 3.5.15

com.jidesoft.grouper
Interface ObjectGrouper

All Known Implementing Classes:
AbstractObjectGrouper, DateDayOfMonthGrouper, DateDayOfWeekGrouper, DateDayOfWeekInMonthGrouper, DateDayOfYearGrouper, DateGrouper, DateMonthGrouper, DateQuarterGrouper, DateWeekOfMonthGrouper, DateWeekOfYearGrouper, DateYearGrouper, DefaultObjectGrouper

public interface ObjectGrouper

An interface that can convert a object to a group so that the objects that has the same group can be grouped together. We suggest you extends AbstractObjectGrouper if you want to create your own ObjectGrouper in case we add new methods to this interface due to requirement changes.


Method Summary
 ComparatorContext getComparatorContext()
          Gets the comparator context for the value returned from this object grouper.
 ConverterContext getConverterContext()
          Gets the converter context for the value returned from this object grouper.
 String getName()
          Gets the name of this object grouper.
 Class<?> getType()
          Gets the group value type.
 Object getValue(Object value)
          Gets the group value after this value is grouped.
 

Method Detail

getValue

Object getValue(Object value)
Gets the group value after this value is grouped. If two objects return the same value in this getGroupValue method, the two objects are considered as one group. We assume all values returned from this method are of the same type which is returned in getType().

Parameters:
value - the value
Returns:
the value after grouped.

getType

Class<?> getType()
Gets the group value type. It should be the type of the value that is returned from the getGroupValue.

Returns:
the group value type.

getName

String getName()
Gets the name of this object grouper.

Returns:
the name of this grouper.

getConverterContext

ConverterContext getConverterContext()
Gets the converter context for the value returned from this object grouper. This converter context will be used to find the ObjectConverter that will convert the value returned from getValue(Object) method to String so that it can be displayed somewhere.

Returns:
the converter context.

getComparatorContext

ComparatorContext getComparatorContext()
Gets the comparator context for the value returned from this object grouper. This comparator context will be used to find the ObjectComparator that will sort the values return from getValue(Object) method whenever sorting is needed.

Returns:
the converter context.

JIDE 3.5.15