public boolean equals(Object object) {
    if (object == null) {
      return false;
    }
    if (object instanceof CycVariable) {
      CycVariable var = (CycVariable) object;
      return (isMetaVariable() == var.isMetaVariable())
              && var.name.equals(name);
    } else if (object instanceof CycSymbol) {
      final CycSymbol other = (CycSymbol) object;
      if (name.equals(other.getSymbolName())) {
        if (isMetaVariable()) {
          return other.isKeyword();
        } else {
          return !other.isKeyword();
        }
      }
    }
    return false;
  }