@Test public void valueFunction() throws Exception { Function f = new ValueFunction("test"); assertEquals(1, f.parameters().length); Values.SimpleMap v = new Values.SimpleMap(); v.put("test", "a"); assertEquals("a", f.getString(v)); assertFalse(f.getBoolean(v)); assertEquals(FunctionLibrary.ERROR, f.getString(new Values.None())); Collection<String> dialogFunctions = new ArrayList<>(); f.getFunctionDialogReferences(dialogFunctions); assertTrue(dialogFunctions.isEmpty()); }
public ValueFunction(String valueName) { params = new String[] { valueName }; }
ValueFunction implements Function { public ValueFunction(String valueName) { params = new String[] { valueName }; } }
ValueFunction implements Function { public ValueFunction(String valueName) { params = new String[] { valueName }; } ValueFunction(String valueName); }
ValueFunction implements Function { public ValueFunction(String valueName) { params = new String[] { valueName }; } ValueFunction(String valueName); @Override String[] parameters(); @Override void getFunctionDialogReferences(Collection<String> set); @Override String getString(Values parameters); @Override boolean getBoolean(Values parameters); }
ValueFunction implements Function { public ValueFunction(String valueName) { params = new String[] { valueName }; } ValueFunction(String valueName); @Override String[] parameters(); @Override void getFunctionDialogReferences(Collection<String> set); @Override String getString(Values parameters); @Override boolean getBoolean(Values parameters);  }