|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.northwestern.at.wordhoard.model.grouping.GroupingOptions
public class GroupingOptions
A set of grouping options.
Field Summary | |
---|---|
static int |
ASCENDING
Ascending option. |
static int |
DESCENDING
Descending option. |
static int |
NUM_ORDER_BY
Number of order by options. |
static int |
ORDER_ALPHABETICALLY
Order alphapetically option. |
static int |
ORDER_BY_COUNT
Order by count (number of matches) option. |
static int |
ORDER_BY_DATE
Order by date option. |
static int |
ORDER_BY_FREQUENCY
Order by frequency option. |
static int |
ORDER_BY_LOCATION
Order by word tag option. |
static java.lang.String[] |
ORDER_BY_NAMES
Ordering option names. |
static java.lang.String[] |
UP_DOWN_NAMES
Ascending/descending option names. |
Constructor Summary | |
---|---|
GroupingOptions(java.lang.Class groupBy,
int orderBy,
int upDown)
Creates a new set of grouping options. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object obj)
Returns true if some other object is equal to this one. |
java.lang.Class |
getGroupBy()
Gets the grouping option. |
int |
getOrderBy()
Gets the ordering option. |
int |
getUpDown()
Gets the ascending/descending option. |
java.util.Map |
group(java.util.Collection results)
Groups a collection of search results. |
void |
setGroupBy(java.lang.Class groupBy)
Sets the grouping option. |
void |
setOrderBy(int orderBy)
Sets the ordering option. |
void |
setUpDown(int upDown)
Sets the ascending/descending option. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int ORDER_BY_FREQUENCY
public static final int ORDER_BY_COUNT
public static final int ORDER_ALPHABETICALLY
public static final int ORDER_BY_DATE
public static final int ORDER_BY_LOCATION
public static final int NUM_ORDER_BY
public static final java.lang.String[] ORDER_BY_NAMES
public static final int ASCENDING
public static final int DESCENDING
public static final java.lang.String[] UP_DOWN_NAMES
Constructor Detail |
---|
public GroupingOptions(java.lang.Class groupBy, int orderBy, int upDown)
groupBy
- Grouping class.orderBy
- Ordering option.upDown
- Ascending/descending option. Method Detail |
---|
public java.lang.Class getGroupBy()
public void setGroupBy(java.lang.Class groupBy)
groupBy
- Grouping class. public int getOrderBy()
public void setOrderBy(int orderBy)
orderBy
- Ordering option. public int getUpDown()
public void setUpDown(int upDown)
upDown
- Ascending/descending option. public java.util.Map group(java.util.Collection results)
The groupBy class must not be null.
If the orderBy option is ORDER_BY_FREQUENCY, the groupBy class must implement the CanGetRelFreq interface.
If the orderBy option is ORDER_BY_LOCATION, the groupBy class must be WorkPart.class.
If the orderBy option is ORDER_BY_DATE, the groupBy class must be Work.class, PubYearRange.class, or PubDecade.class.
results
- Collection of search results.
public boolean equals(java.lang.Object obj)
The two sets of grouping options are equal if all three of their component options are equal.
equals
in class java.lang.Object
obj
- The other object.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |