public class Assertions
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static int |
atMostOneOf(java.lang.Object... namesAndValues)
Accepts 2*N arguments, even ones being names and odd ones being values for those names.
|
static int |
exactlyOneOf(java.lang.Object... namesAndValues)
Accepts 2*N arguments, even ones being names and odd ones being values for those names.
|
public static int exactlyOneOf(java.lang.Object... namesAndValues)
null
java.lang.IllegalArgumentException
- if more than one argument is non nulljava.lang.IllegalStateException
- if the method is called with wrong values (e.g. non even number of args)public static int atMostOneOf(java.lang.Object... namesAndValues)
null
, or -1 if none was setjava.lang.IllegalArgumentException
- if more than one argument is non nulljava.lang.IllegalStateException
- if the method is called with wrong values (e.g. non even number of args)