litesoft
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
package org.litesoft.core.typeutils;
public class Integers
{
public static final int[] EMPTY_ARRAY_PRIMITIVES = new int[0];
public static final Integer[] EMPTY_ARRAY = new Integer[0];
public static int assertPositive( String pWhat, int pInt )
{
if ( 0 < pInt )
{
return pInt;
}
throw new IllegalArgumentException( pWhat + " expected to be positive, but was: " + pInt );
}
public static int assertNonNegative( String pWhat, int pInt )
{
if ( 0 <= pInt )
{
return pInt;
}
throw new IllegalArgumentException( pWhat + " expected to be non-negative, but was: " + pInt );
}
}
|
Revision |
Author |
Commited |
Message |
787
|
GeorgeS
|
Mon 30 Jul, 2012 03:00:12 +0000 |
|