Package 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 extendsAbstractObjectGrouper
if you want to create your own ObjectGrouper in case we add new methods to this interface due to requirement changes.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description 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.java.lang.String
getName()
Gets the name of this object grouper.java.lang.Class<?>
getType()
Gets the group value type.java.lang.Object
getValue(java.lang.Object value)
Gets the group value after this value is grouped.
-
-
-
Method Detail
-
getValue
java.lang.Object getValue(java.lang.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 ingetType()
.- Parameters:
value
- the value- Returns:
- the value after grouped.
-
getType
java.lang.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
java.lang.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 fromgetValue(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 fromgetValue(Object)
method whenever sorting is needed.- Returns:
- the converter context.
-
-