Constructor that takes two operands.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 search terms terms = new SearchTerm[t.length]; for (int i = 0; i < t.length; i++) terms[i] = t[i];
terms = new SearchTerm[t.length]; for (int i = 0; i < t.length; i++) terms[i] = t[i];
Equality comparison. if (!(obj instanceof OrTerm)) return false; OrTerm ot = (OrTerm)obj; if (ot.terms.length != terms.length) return false; for (int i=0; i < terms.length; i++) if (!terms[i].equals(ot.terms[i])) return false; return true;
if (!(obj instanceof OrTerm)) return false; OrTerm ot = (OrTerm)obj; if (ot.terms.length != terms.length) return false; for (int i=0; i < terms.length; i++) if (!terms[i].equals(ot.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 OR operation. The terms specified in the constructor are applied to the given object and the OR operator is applied to their results.parammsg The specified SearchTerms are applied to this Message and the OR operator is applied to their results.returntrue if the OR succeds, otherwise false for (int i=0; i < terms.length; i++) if (terms[i].match(msg)) return true; return false;
The terms specified in the constructor are applied to the given object and the OR operator is applied to their results.
for (int i=0; i < terms.length; i++) if (terms[i].match(msg)) return true; return false;