コード例 #1
0
  private void populateFunctionInstances() {
    class Function_test1_c implements ClassQueryInterface_c {
      Function_test1_c(String p) {
        m_p = p;
      }

      private String m_p;

      public boolean evaluate(Object inst) {
        Function_c selected = (Function_c) inst;
        return selected.getName().equals(m_p);
      }
    }
    for (int i = 0; i < funcs.length; ++i) {
      Function_c testFunc =
          Function_c.FunctionInstance(arrayModelRoot, new Function_test1_c(funcs[i]));
      if (testFunc != null) {
        if (m_testFunc[i] == null) m_testFunc[i] = testFunc;
      } else fail("Missing function " + funcs[i]); // $NON-NLS-1$
    }
  }
コード例 #2
0
 public boolean evaluate(Object inst) {
   Function_c selected = (Function_c) inst;
   return selected.getName().equals(m_p);
 }