Package org.drools.core.util

Examples of org.drools.core.util.PrimitiveLongMap


                 new Object() );
    }

    @Test
    public void testSize() {
        final PrimitiveLongMap map = new PrimitiveLongMap( 32,
                                                           8 );

        final Object object = new Object();
        map.put( 231,
                 object );
        final Object string = new Object();
        map.put( 211,
                 string );
        map.put( 99822,
                 null );
        assertEquals( 3,
                      map.size() );

        map.put( 211,
                 null );
        map.put( 99822,
                 string );
        assertEquals( 3,
                      map.size() );

        map.remove( 211 );
        assertEquals( 2,
                      map.size() );
        map.remove( 99822 );
        assertEquals( 1,
                      map.size() );

        map.remove( 231 );
        assertEquals( 0,
                      map.size() );
    }
View Full Code Here

TOP

Related Classes of org.drools.core.util.PrimitiveLongMap

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.