-public enum FilterBy
-{
-
- @XmlEnumValue("byLabel")
- BY_LABEL("byLabel"), @XmlEnumValue("byScore")
- BY_SCORE("byScore"), @XmlEnumValue("byAttribute")
- BY_ATTRIBUTE("byAttribute");
-
- private final String value;
-
- FilterBy(String v)
- {
- value = v;
- }
-
- public String value()
- {
- return value;
- }
-
- public static FilterBy fromValue(String v)
- {
- for (FilterBy c : FilterBy.values())
- {
- if (c.value.equals(v))
- {
- return c;
- }
+public enum FilterBy {
+
+ @XmlEnumValue("byLabel")
+ BY_LABEL("byLabel"),
+ @XmlEnumValue("byScore")
+ BY_SCORE("byScore"),
+ @XmlEnumValue("byAttribute")
+ BY_ATTRIBUTE("byAttribute");
+ private final String value;
+
+ FilterBy(String v) {
+ value = v;
+ }
+
+ public String value() {
+ return value;
+ }
+
+ public static FilterBy fromValue(String v) {
+ for (FilterBy c: FilterBy.values()) {
+ if (c.value.equals(v)) {
+ return c;
+ }
+ }
+ throw new IllegalArgumentException(v);