| 1 | |
|
| 2 | |
|
| 3 | |
|
| 4 | |
|
| 5 | |
|
| 6 | |
package jaggregate.internal; |
| 7 | |
|
| 8 | |
import static java.lang.String.*; |
| 9 | |
|
| 10 | |
|
| 11 | |
|
| 12 | |
|
| 13 | |
|
| 14 | |
|
| 15 | |
|
| 16 | |
public class ArgumentChecks { |
| 17 | |
public static final String DISCRIMINATOR = "discriminator"; |
| 18 | |
public static final String OPERATION = "operation"; |
| 19 | |
public static final String TRANSFORMER = "transformer"; |
| 20 | |
public static final String EMPTY_SEQUENCE = "empty sequence"; |
| 21 | |
public static final String REPLACEMENT_SEQUENCE = "replacement sequence"; |
| 22 | |
public static final String SEQUENCE = "sequence"; |
| 23 | |
public static final String COLLECTION = "collection"; |
| 24 | |
public static final String MAPPER = "mapper"; |
| 25 | |
public static final String STARTING_INDEX = "starting"; |
| 26 | |
public static final String ENDING_INDEX = "ending"; |
| 27 | |
public static final String ADDITION_INDEX = "addition"; |
| 28 | |
public static final String NEGATIVE_AMOUNT = "illegal negative amount: "; |
| 29 | |
public static final String EXPECTED_SEQUENCE_SIZE = |
| 30 | |
"expecting sequence to have size "; |
| 31 | |
public static final String BUT_WAS = ", was "; |
| 32 | |
public static final String ITERABLE = "iterable"; |
| 33 | |
private static final String NULL_FORMAT = "illegal null %1$s"; |
| 34 | |
|
| 35 | |
|
| 36 | |
|
| 37 | |
|
| 38 | |
|
| 39 | |
|
| 40 | 1 | protected ArgumentChecks() { |
| 41 | 1 | throw new UnsupportedOperationException(); |
| 42 | |
} |
| 43 | |
|
| 44 | |
|
| 45 | |
|
| 46 | |
|
| 47 | |
|
| 48 | |
|
| 49 | |
|
| 50 | |
|
| 51 | |
|
| 52 | |
|
| 53 | |
public static void ensureNotNull( Object target, String failureMessage ) { |
| 54 | 39393 | if ( target == null ) |
| 55 | 288 | throw new NullPointerException( format( NULL_FORMAT, failureMessage ) ); |
| 56 | 39105 | } |
| 57 | |
} |