|
⇤ ← Revision 1 as of 2009-06-15 09:51:40
Size: 1391
Comment:
|
← Revision 2 as of 2009-09-20 23:57:18 ⇥
Size: 1391
Comment: converted to 1.6 markup
|
| No differences found! | |
/**
- some meta-info for filters, such as the configured level (engine/host, etc), and the
- order it being configured in the config file.
- @author xxd
*/
public class FilterMetaInfo implements Comparable<FilterMetaInfo> {
//
Level for filters
public static enum FilterLevels {
- ENGINE("engine"), HOST("host"), CONTEXT("context"), WRAPPER("wrapper"); private final String readableName;
private FilterLevels(String readableName) {
- this.readableName = readableName;
private final FilterLevels level; private final int order;
public FilterMetaInfo(FilterLevels level, int order) {
- super(); this.level = level; this.order = order;
- @return the level
- /
public FilterLevels getLevel() {
- return level;
- @return the order
- /
- return order;
return (order1 < order2 ? -1 : (order1 == order2 ? 0 : 1));
public int compareTo(FilterMetaInfo o) {
- if (o.level != this.level) {
- return compareOrder(this.order, o.order);
- return this.level.compareTo(o.level);
- ENGINE("engine"), HOST("host"), CONTEXT("context"), WRAPPER("wrapper"); private final String readableName;
}