@Test public void testGetFunction() throws Exception { Program program = new Program("test"); Function f = new Function("f", Type.INT, Type.INT); program.addFunction(f); assertEquals(f, program.getFunction("f")); }
public final Function getFunction(final String id) { return this.functions.get(id); }
Program { public final Function getFunction(final String id) { return this.functions.get(id); } }
Program { public final Function getFunction(final String id) { return this.functions.get(id); } Program(final String id); }
Program { public final Function getFunction(final String id) { return this.functions.get(id); } Program(final String id); final String getId(); final Variable getVariable(final String id); final void addVariable(final Variable var); final Function getFunction(final String id); final void addFunction(final Function function); final OperationSequence getBody(); Set<Variable> getVariables(); Set<Function> getFunctions(); @Override final String toString(); }
Program { public final Function getFunction(final String id) { return this.functions.get(id); } Program(final String id); final String getId(); final Variable getVariable(final String id); final void addVariable(final Variable var); final Function getFunction(final String id); final void addFunction(final Function function); final OperationSequence getBody(); Set<Variable> getVariables(); Set<Function> getFunctions(); @Override final String toString();  }