Skip to content

Method: getValue()

1: package de.fhdw.gaming.ipspiel23.c4.domain.impl.validation;
2:
3: /**
4: * Represents the update context for a {@link C4BoardValidator}.
5: * Validation state update context instances are consumed by the validator to update the validation state.
6: */
7: public class C4BoardValidationStateUpdateContext {
8:
9: /**
10: * The limits to update.
11: */
12: private final C4BoardLimits limits;
13:
14: /**
15: * The value to update the limits with.
16: */
17: private int value;
18:
19: /**
20: * Creates a new instance of {@link C4BoardValidationStateUpdateContext}.
21: *
22: * @param limits The limits to update.
23: * @param value The value to update the limits with.
24: */
25: C4BoardValidationStateUpdateContext(final C4BoardLimits limits, final int value) {
26: this.limits = limits;
27: this.value = value;
28: }
29:
30: /**
31: * Gets the limits to update.
32: */
33: public C4BoardLimits getState() {
34: return limits;
35: }
36:
37: /**
38: * Gets the value to update the limits with.
39: */
40: public int getValue() {
41: return value;
42: }
43:
44: /**
45: * Sets the value to update the limits with.
46: * @param value the new value
47: */
48: void setValue(final int value) {
49: this.value = value;
50: }
51: }