litesoft
@ 936
litesoft / trunk / DeviceDesktopTest / src / org / litesoft / core / typeutils / Longs.java
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 26 27 28 29 30 31 32 33 |
package org.litesoft.core.typeutils; public class Longs extends Numerics { public static Long assertNonNegative( String pName, Long pValue ) throws IllegalArgumentException { if ( pValue != null ) { assertNonNegative( pName, pValue.longValue() ); } return pValue; } public static long assertNonNegative( String pName, long pValue ) throws IllegalArgumentException { if ( pValue < 0 ) { throw new IllegalArgumentException( pName + CANNOT_BE_NEGATIVE + ", but was: " + pValue ); } return pValue; } public static void assertNotEqual( String pObjectName, long pNotExpected, long pActual ) throws IllegalArgumentException { if ( pNotExpected == pActual ) { throw new IllegalArgumentException( pObjectName + ": '" + pNotExpected + "' Not allowed" ); } } } |
Commits for litesoft/trunk/DeviceDesktopTest/src/org/litesoft/core/typeutils/Longs.java
Revision | Author | Commited | Message |
---|---|---|---|
936 | GeorgeS | Sun 01 Jun, 2014 20:19:38 +0000 | Language Support |