Constructor that takes two terms.paramt1 first termparamt2 second term terms = new SearchTerm[2]; terms[0] = t1; terms[1] = t2;
terms = new SearchTerm[2]; terms[0] = t1; terms[1] = t2;
Constructor that takes an array of SearchTerms.paramt array of terms terms = new SearchTerm[t.length]; // clone the array for (int i = 0; i < t.length; i++) terms[i] = t[i];
terms = new SearchTerm[t.length]; // clone the array for (int i = 0; i < t.length; i++) terms[i] = t[i];
Equality comparison. if (!(obj instanceof AndTerm)) return false; AndTerm at = (AndTerm)obj; if (at.terms.length != terms.length) return false; for (int i=0; i < terms.length; i++) if (!terms[i].equals(at.terms[i])) return false; return true;
if (!(obj instanceof AndTerm)) return false; AndTerm at = (AndTerm)obj; if (at.terms.length != terms.length) return false; for (int i=0; i < terms.length; i++) if (!terms[i].equals(at.terms[i])) return false; return true;
Return the search terms. return (SearchTerm[])terms.clone();
return (SearchTerm[])terms.clone();
Compute a hashCode for this object. int hash = 0; for (int i=0; i < terms.length; i++) hash += terms[i].hashCode(); return hash;
int hash = 0; for (int i=0; i < terms.length; i++) hash += terms[i].hashCode(); return hash;
The AND operation. The terms specified in the constructor are applied to the given object and the AND operator is applied to their results.parammsg The specified SearchTerms are applied to this Message and the AND operator is applied to their results.returntrue if the AND succeds, otherwise false for (int i=0; i < terms.length; i++) if (!terms[i].match(msg)) return false; return true;
The terms specified in the constructor are applied to the given object and the AND operator is applied to their results.
for (int i=0; i < terms.length; i++) if (!terms[i].match(msg)) return false; return true;