@@ -70,6 +70,14 @@ public final class StreamValidator implements StreamReceiver {
70
70
71
71
private final WellformednessChecker wellformednessChecker = new WellformednessChecker ();
72
72
73
+ /**
74
+ * Constructs a StreamValidator with a List of {@link Event}s. Validates this
75
+ * stream of events using that list of expected stream events. If the stream is
76
+ * invalid, the error handler set via {@link #setErrorHandler(Consumer)} is
77
+ * called. Checks for wellformedness and resets the stream.
78
+ *
79
+ * @param expectedStream the List of expected stream events
80
+ */
73
81
public StreamValidator (final List <Event > expectedStream ) {
74
82
this .eventStream = new EventNode (null , null );
75
83
foldEventStream (this .eventStream , expectedStream .iterator ());
@@ -100,6 +108,12 @@ public boolean isStrictRecordOrder() {
100
108
return strictRecordOrder ;
101
109
}
102
110
111
+ /**
112
+ * Sets strict record order.
113
+ *
114
+ * @param strictRecordOrder "true" if the record order shall be strict or
115
+ * "false" otherwise
116
+ */
103
117
public void setStrictRecordOrder (final boolean strictRecordOrder ) {
104
118
if (validating ) {
105
119
throw new IllegalStateException (CANNOT_CHANGE_OPTIONS );
@@ -112,6 +126,11 @@ public boolean isStrictKeyOrder() {
112
126
return strictKeyOrder ;
113
127
}
114
128
129
+ /**
130
+ * Sets strict key order.
131
+ *
132
+ * @param strictKeyOrder "true" if key order should be strict, otherwise "false"
133
+ */
115
134
public void setStrictKeyOrder (final boolean strictKeyOrder ) {
116
135
if (validating ) {
117
136
throw new IllegalStateException (CANNOT_CHANGE_OPTIONS );
@@ -124,6 +143,12 @@ public boolean isStrictValueOrder() {
124
143
return strictValueOrder ;
125
144
}
126
145
146
+ /**
147
+ * Sets strict value order.
148
+ *
149
+ * @param strictValueOrder "true" if value order should be strict, otherwise
150
+ * "false"
151
+ */
127
152
public void setStrictValueOrder (final boolean strictValueOrder ) {
128
153
if (validating ) {
129
154
throw new IllegalStateException (CANNOT_CHANGE_OPTIONS );
0 commit comments