@Test public void matchFunction() throws Exception { Function input = new StringLiteralFunction("abc"); Pattern p = Pattern.compile("abc"); Function f = new MatchFunction(input, p); assertEquals(0, f.parameters().length); assertEquals("true", f.getString(null)); assertTrue(f.getBoolean(null)); Collection<String> dialogFunctions = new ArrayList<>(); f.getFunctionDialogReferences(dialogFunctions); assertTrue(dialogFunctions.isEmpty()); f = new MatchFunction(new StringLiteralFunction(FunctionLibrary.ERROR), p); assertEquals(FunctionLibrary.ERROR, f.getString(null)); }
public MatchFunction(Function input, Pattern p) { pattern = p; this.input = input; }
MatchFunction implements Function { public MatchFunction(Function input, Pattern p) { pattern = p; this.input = input; } }
MatchFunction implements Function { public MatchFunction(Function input, Pattern p) { pattern = p; this.input = input; } MatchFunction(Function input, Pattern p); }
MatchFunction implements Function { public MatchFunction(Function input, Pattern p) { pattern = p; this.input = input; } MatchFunction(Function input, Pattern p); @Override String getString(Values parameters); @Override String[] parameters(); @Override void getFunctionDialogReferences(Collection<String> set); @Override boolean getBoolean(Values parameters); }
MatchFunction implements Function { public MatchFunction(Function input, Pattern p) { pattern = p; this.input = input; } MatchFunction(Function input, Pattern p); @Override String getString(Values parameters); @Override String[] parameters(); @Override void getFunctionDialogReferences(Collection<String> set); @Override boolean getBoolean(Values parameters);  }