public boolean tableFieldsEqual(TablePermission tp) {
    if (tp == null) {
      return false;
    }

    boolean tEq = (table == null && tp.table == null) || (table != null && table.equals(tp.table));
    boolean fEq = (family == null && tp.family == null) || Bytes.equals(family, tp.family);
    boolean qEq =
      (qualifier == null && tp.qualifier == null) || Bytes.equals(qualifier, tp.qualifier);
    return tEq && fEq && qEq;
  }
Check if fields of table in table permission equals.
@param tp to be checked table permission
@return true if equals, false otherwise
hbase-client/src/main/java/org/apache/hadoop/hbase/security/access/TablePermission.java