/** * Calculates hash for storing in database and determining uniqueness. * * @return the calculated hash */ public static long calculateHash(QueryTag[] tagsArray) { long hash = 1; for (QueryTag t : tagsArray) hash = 31 * hash + t.hashCode(); return hash; }
/** * Calculates hash for storing in database and determining uniqueness. * * @return the calculated hash */ public long calculateHash() { long hash = 1; for (QueryTag t : tags) hash = 31 * hash + t.hashCode(); return hash; }