Skip to content

Commit b379ff8

Browse files
committed
Add withExtensibility()
1 parent afea188 commit b379ff8

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/main/java/org/skyscreamer/jsonassert/JSONCompareMode.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,4 +79,11 @@ public boolean hasStrictOrder() {
7979
public JSONCompareMode butNotStrict() {
8080
return isExtensible() ? LENIENT : NON_EXTENSIBLE;
8181
}
82+
83+
/**
84+
* @return the extensible equivalent.
85+
*/
86+
public JSONCompareMode withExtensibility() {
87+
return hasStrictOrder() ? STRICT_ORDER : LENIENT;
88+
}
8289
}

0 commit comments

Comments
 (0)