On 11/15/06, Tom <[EMAIL PROTECTED]> wrote:
>One hack: implement a simple query that delegates to another query and
>encapsulates the trim value... that way hashCode/equals won't match
>unless the trim does.

Not sure what you mean by "delegates to another query". Could you
clarify or give me a pointer?

Something like
public class TrimmedQuery extends Query {
  Query delegate;
  public TrimmedQuert(Query delegate, int trim) {
    this.delegate = delegate;
  }
  // now override hashCode + equals to include trim and implement all other
  // methods by delegating them.
}

I was thinking in terms of just adding some guaranteed true clause to
the end when trimming, is that similar to what you were talking about?

Yes, that should work too.

-Yonik

Reply via email to