code: @Override
      public boolean match(Term term) {
  
          // XXX the checks here essentially reproduce the
          // semantics of the reaction function
  
          FunctionEnum fx = term.getFunctionEnum();
          if (fx != REACTION) {
              // Reaction functions only
              return false;
          }
          List<BELObject> args = term.getFunctionArguments();
          if (noItems(args) || args.size() != 2) {
              // Two function arguments only
              return false;
          }
  
          BELObject x = args.get(0);
          if (!(x instanceof Term)) {
              // First argument must be a term
              return false;
          }
  
          BELObject y = args.get(1);
          if (!(y instanceof Term)) {
              // Second argument must be a term
              return false;
          }
  
          Term xtrm = (Term) x;
          if (xtrm.getFunctionEnum() != REACTANTS) {
              // First argument must be a reactants function
              return false;
          }
  
          Term ytrm = (Term) y;
          if (ytrm.getFunctionEnum() != PRODUCTS) {
              // Second argument must be a products function
              return false;
          }
  
          List<BELObject> xtrmArgs = xtrm.getFunctionArguments();
          if (noItems(xtrmArgs)) {
              // At least one argument to the reactants function is necessary
              return false;
          }
  
          List<BELObject> ytrmArgs = ytrm.getFunctionArguments();
          if (noItems(ytrmArgs)) {
              // At least one argument to the products function is necessary
              return false;
          }
  
          for (final BELObject o : xtrmArgs) {
              // All arguments must be terms
              if (!(o instanceof Term)) {
                  return false;
              }
          }
  
          for (final BELObject o : ytrmArgs) {
              // All arguments must be terms
              if (!(o instanceof Term)) {
                  return false;
              }
          }
  
          return true;
      }
docs: {@inheritDoc}