public class Assertions extends Object
Modifier and Type | Method and Description |
---|---|
static int |
atMostOneOf(Object... namesAndValues)
Accepts 2*N arguments, even ones being names and odd ones being values for those
names.
|
static int |
exactlyOneOf(Object... namesAndValues)
Accepts 2*N arguments, even ones being names and odd ones being values for those
names.
|
public static int exactlyOneOf(Object... namesAndValues)
namesAndValues
- the list of names and valuesnull
IllegalStateException
- if more than one argument is non nullIllegalArgumentException
- if the method is called with invalid values (e.g.
non even number of args)public static int atMostOneOf(Object... namesAndValues)
namesAndValues
- the list of names and valuesnull
, or -1 if none was setIllegalStateException
- if more than one argument is non nullIllegalArgumentException
- if the method is called with invalid values (e.g.
non even number of args)Copyright © 2024 Pivotal Software, Inc.. All rights reserved.