@Override public int hashCode() { int sum = 0; for (Condition kp : this) sum += kp.hashCode(); return new HashCodeBuilder().append(getType()).append(sum).toHashCode(); }
@Override public String toString() { return toString(getType().toString()); }
@Override public boolean equals(Object other) { if (this == other) return true; if (other == null || !getClass().isInstance(other)) return false; MultiCondition oth = (MultiCondition)other; if (getType() != oth.getType() || size() != oth.size()) return false; for (int i = 0; i < size(); i++) { boolean foundEqual = false; for (int j = 0; j < oth.size(); j++) { if (get(i).equals(oth.get((i + j) % oth.size()))) { foundEqual = true; break; } } if (!foundEqual) return false; } return true; }
@Override public int hashCode() { int sum = 0; for (Condition kp : this) sum += kp.hashCode(); return new HashCodeBuilder().append(getType()).append(sum).toHashCode(); }
@Override public int hashCode() { int sum = 0; for (Condition kp : this) sum += kp.hashCode(); return new HashCodeBuilder().append(getType()).append(sum).toHashCode(); }
@Override public String toString() { return toString(getType().toString()); }
@Override public String toString() { return toString(getType().toString()); }
@Override public boolean equals(Object other) { if (this == other) return true; if (other == null || !getClass().isInstance(other)) return false; MultiCondition oth = (MultiCondition)other; if (getType() != oth.getType() || size() != oth.size()) return false; for (int i = 0; i < size(); i++) { boolean foundEqual = false; for (int j = 0; j < oth.size(); j++) { if (get(i).equals(oth.get((i + j) % oth.size()))) { foundEqual = true; break; } } if (!foundEqual) return false; } return true; }
@Override public boolean equals(Object other) { if (this == other) return true; if (other == null || !getClass().isInstance(other)) return false; MultiCondition oth = (MultiCondition)other; if (getType() != oth.getType() || size() != oth.size()) return false; for (int i = 0; i < size(); i++) { boolean foundEqual = false; for (int j = 0; j < oth.size(); j++) { if (get(i).equals(oth.get((i + j) % oth.size()))) { foundEqual = true; break; } } if (!foundEqual) return false; } return true; }