public String toString() { StringBuilder sb = new StringBuilder(1000); sb.append("OrLogic restriction:\n"); boolean first = true; for (AgeRestriction rst : operands) { if (first) { first = false; sb.append(" "); } else sb.append("OR\n "); sb.append(rst.toString()).append("\n"); } sb.append("End of OrLogic restriction"); return sb.toString(); }