Subversion Repository Public Repository

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
26
27
28
29
30
31
32
33
package org.litesoft.commonfoundation.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/commonfoundation/typeutils/Longs.java

Diff revisions: vs.
Revision Author Commited Message
943 Diff Diff GeorgeS picture GeorgeS Tue 03 Jun, 2014 04:25:50 +0000

Extracting commonfoundation

936 GeorgeS picture GeorgeS Sun 01 Jun, 2014 20:19:38 +0000

Language Support