Code cleanup

This commit is contained in:
Rammelkast committed 2020-03-31 13:15:59 +02:00
1 parent 6afe0049c5
commit f88c31051b
13 files changed
+28 -36

No files matched your search

@@ -82,9 +82,9 @@ import java.util.TreeMap;
*/
public class Rule {
private static String string;
private static final String VARIABLE_SET_REGEX = ".*(_).*=.*";
private static final String FUNCTION_REGEX = ".*\\..*";
private String string;
private Type type;
public enum Type {
@@ -129,7 +129,8 @@ public class Rule {
* @param string the string value to load
* @return an instance of Rule if an implementation exists to handle this rule, null if none are found
*/
public static Rule load(String string) {
@SuppressWarnings({ "rawtypes", "unchecked" })
public static Rule load(String string) {
for (Type type : Type.values()) {
if (type.matches(string)) {
try {