|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.lens.server.api.priority.RangeConf<K,V>
K
- Key type. Integer in the grade range exampleV
- Value Type. String(or a Grade class) in the grade range examplepublic abstract class RangeConf<K extends Comparable<K>,V>
Class for storing range configurations. An Example would be grading system. The value F,30,D,40,C,60,B,80,A corresponds to a system where - inf < marks <= 30 : F 30 < marks <= 40 : D 40 < marks <= 60 : C 60 < marks <= 80 : B 80 < marks <= + Inf : A
rangeConfInstance.get(marks) would give you the grade depending on the range. The utility is for easily storing range configs in config xml files. Implementation is done by storing the least value(floor) and keeping a treemap on rest of values
Method Summary | |
---|---|
V |
get(K key)
Get method. |
String |
toString()
toString representation |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public V get(K key)
key
-
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |