boolean match(ATerm pattern, List list) { if (pattern.getType() == PLACEHOLDER) { ATerm type = ((ATermPlaceholder) pattern).getPlaceholder(); if (type.getType() == ATerm.APPL) { ATermAppl appl = (ATermAppl) type; AFun afun = appl.getAFun(); if (afun.getName().equals("term") && afun.getArity() == 0 && !afun.isQuoted()) { list.add(this); return true; } } }  return false;
public List match(String pattern) throws ParseError { return match(factory.parsePattern(pattern));
  boolean match(ATerm pattern, List list) {    if (pattern.getType() == PLACEHOLDER) {      ATerm type = ((ATermPlaceholder) pattern).getPlaceholder();      if (type.getType() == ATerm.APPL) {        ATermAppl appl = (ATermAppl) type;        AFun afun = appl.getAFun();        if (afun.getName().equals("term") && afun.getArity() == 0 && !afun.isQuoted()) {          list.add(this);          return true;        }      }    }    return false;  }