boolean (Object obj) { if (this == obj) { return true; } if (obj instanceof OrFilter) { OrFilter filter = (OrFilter)obj; if ((left.equals(filter.left) && right.equals(filter.right)) || (left.equals(filter.right) && right.equals(filter.left))) { return true; } } return false; }