(LoadContext context, SelectionCreator<Skill> sc, String condition, String value, boolean negate)
| 86 | } |
| 87 | |
| 88 | @Override |
| 89 | public boolean initialize(LoadContext context, SelectionCreator<Skill> sc, String condition, String value, |
| 90 | boolean negate) |
| 91 | { |
| 92 | if (condition == null) |
| 93 | { |
| 94 | Logging.addParseMessage(Level.SEVERE, |
| 95 | getTokenName() + " Must be a conditional Qualifier, e.g. " + getTokenName() + "=10"); |
| 96 | return false; |
| 97 | } |
| 98 | try |
| 99 | { |
| 100 | ranks = Integer.parseInt(condition); |
| 101 | } |
| 102 | catch (NumberFormatException e) |
| 103 | { |
| 104 | if (MAXRANK.equalsIgnoreCase(condition)) |
| 105 | { |
| 106 | maxRank = true; |
| 107 | } |
| 108 | else |
| 109 | { |
| 110 | Logging.addParseMessage(Level.SEVERE, |
| 111 | getTokenName() + " Must be a numerical conditional Qualifier, e.g. " + getTokenName() |
| 112 | + "=10 ... Offending value: " + condition); |
| 113 | return false; |
| 114 | } |
| 115 | } |
| 116 | negated = negate; |
| 117 | if (value == null) |
| 118 | { |
| 119 | pcs = sc.getAllReference(); |
| 120 | } |
| 121 | else |
| 122 | { |
| 123 | pcs = context.getPrimitiveChoiceFilter(sc, value); |
| 124 | wasRestricted = true; |
| 125 | } |
| 126 | return pcs != null; |
| 127 | } |
| 128 | |
| 129 | @Override |
| 130 | public GroupingState getGroupingState() |
nothing calls this directly
no test coverage detected