@Test public void evaluate(){ assertEquals(Arrays.asList(""), evaluate("", ";")); assertEquals(Arrays.asList("", ""), evaluate(";", ";")); assertEquals(Arrays.asList("", "", ""), evaluate(";;", ";")); assertEquals(Arrays.asList("A"), evaluate("A", ",")); assertEquals(Arrays.asList("", "A"), evaluate(",A", ",")); assertEquals(Arrays.asList("A", ""), evaluate("A,", ",")); assertEquals(Arrays.asList("", "A", ""), evaluate(",A,", ",")); }
public List<String> evaluate(String input, String regex){ Pattern pattern = RegExUtil.compile(regex, null); String[] values = pattern.split(input, -1); return Arrays.asList(values); }
SplitFunction extends BinaryFunction { public List<String> evaluate(String input, String regex){ Pattern pattern = RegExUtil.compile(regex, null); String[] values = pattern.split(input, -1); return Arrays.asList(values); } }
SplitFunction extends BinaryFunction { public List<String> evaluate(String input, String regex){ Pattern pattern = RegExUtil.compile(regex, null); String[] values = pattern.split(input, -1); return Arrays.asList(values); } SplitFunction();  SplitFunction(String name); }
SplitFunction extends BinaryFunction { public List<String> evaluate(String input, String regex){ Pattern pattern = RegExUtil.compile(regex, null); String[] values = pattern.split(input, -1); return Arrays.asList(values); } SplitFunction();  SplitFunction(String name); List<String> evaluate(String input, String regex); @Override FieldValue evaluate(FieldValue first, FieldValue second); }
SplitFunction extends BinaryFunction { public List<String> evaluate(String input, String regex){ Pattern pattern = RegExUtil.compile(regex, null); String[] values = pattern.split(input, -1); return Arrays.asList(values); } SplitFunction();  SplitFunction(String name); List<String> evaluate(String input, String regex); @Override FieldValue evaluate(FieldValue first, FieldValue second);  }