package bargainingchips.protocol; import bargainingchips.actions.Offer; /** * An offer may be valid or invalid. * As a secondary result, the may also lead to an outcome with offer type END, namely: * * 1. An agreement * 2. A disagreement * * Otherwise, the negotiation is ongoing and the outcome is null. */ public class ValidationResult { boolean valid; Offer outcome; public ValidationResult() { valid = false; outcome = null; } public ValidationResult(boolean valid, Offer outcome) { super(); this.valid = valid; this.outcome = outcome; } public boolean isValid() { return valid; } public boolean hasEnded() { return outcome != null && outcome.isEnd(); } public Offer getOutcome() { return outcome; } }