public boolean contains(String aPattern){
  if (TextUtils.isEmpty(aPattern)) {
    return false;
  }
  boolean res=false;
  if (!TextUtils.isEmpty(mLowerCaseDisplayName)) {
    res=mLowerCaseDisplayName.contains(aPattern);
  }
  if (!res && !TextUtils.isEmpty(mLowerCaseMatrixId)) {
    res=mLowerCaseMatrixId.contains(aPattern);
  }
  if (!res && (null != mContact)) {
    res=mContact.contains(aPattern);
  }
  return res;
}

public boolean contains ( String aPattern ) { if ( TextUtils . isEmpty ( aPattern ) ) { return false ; } boolean res = false ; if ( ! TextUtils . isEmpty ( mLowerCaseDisplayName ) ) { res = mLowerCaseDisplayName . contains ( aPattern ) ; } if ( ! res && ! TextUtils . isEmpty ( mLowerCaseMatrixId ) ) { res = mLowerCaseMatrixId . contains ( aPattern ) ; } if ( ! res && ( null != mContact ) ) { res = mContact . contains ( aPattern ) ; } return res ; }
test if a room member fields contains a dedicated pattern . the check is done with the displayname and the userid .
