Examples of PrimitiveLongMap


Examples of org.drools.core.util.PrimitiveLongMap

     */


    public SequentialAgendaGroupImpl(final String name, final ConflictResolver conflictResolver) {
        this.name = name;
        this.queue = new PrimitiveLongMap();//new BinaryHeapQueue( conflictResolver );
    }
View Full Code Here

Examples of org.drools.core.util.PrimitiveLongMap

     */


    public SequentialAgendaGroupImpl(final String name, final ConflictResolver conflictResolver) {
        this.name = name;
        this.queue = new PrimitiveLongMap();//new BinaryHeapQueue( conflictResolver );
    }
View Full Code Here

Examples of org.drools.core.util.PrimitiveLongMap

     */


    public SequentialAgendaGroupImpl(final String name, final ConflictResolver conflictResolver) {
        this.name = name;
        this.queue = new PrimitiveLongMap();//new BinaryHeapQueue( conflictResolver );
    }
View Full Code Here

Examples of org.drools.core.util.PrimitiveLongMap

     */


    public SequentialAgendaGroupImpl(final String name, final ConflictResolver conflictResolver) {
        this.name = name;
        this.queue = new PrimitiveLongMap();//new BinaryHeapQueue( conflictResolver );
    }
View Full Code Here

Examples of org.drools.core.util.PrimitiveLongMap

        assertNotNull( map.remove( 128 ) );
        assertNull( map.get( 128 ) );
    }

    public void testLastIndexBoundary() {
        final PrimitiveLongMap map = new PrimitiveLongMap( 32,
                                                           8 );
        map.put( 8192,
                 new Object() );
        map.remove( 8192 );
        map.put( 8192,
                 new Object() );
        map.put( 8191,
                 new Object() );
    }
View Full Code Here

Examples of org.drools.core.util.PrimitiveLongMap

        map.put( 8191,
                 new Object() );
    }

    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

Examples of org.drools.core.util.PrimitiveLongMap

import junit.framework.TestCase;

public class PrimitiveLongMapTest extends TestCase {
    public void testValues() {
        final PrimitiveLongMap map = new PrimitiveLongMap();
        assertNotNull( "MapNotNullTest ",
                       map );

        final Collection values = map.values();
        assertNotNull( "ValuesNotNullTest ",
                       values );
        assertEquals( "ValuesZeroSizeTest ",
                      0,
                      values.size() );
View Full Code Here

Examples of org.drools.core.util.PrimitiveLongMap

                      0,
                      values.size() );
    }

    public void testPaging() {
        final PrimitiveLongMap map = new PrimitiveLongMap( 32,
                                                           8 );

        for ( int i = 0; i < 512; i++ ) {
            final Integer value = new Integer( i );

            final Object oldValue = map.put( i,
                                             value );
            assertNull( "OldValueNullTest ",
                        oldValue );
            assertEquals( "OldValueNullTest ",
                          value,
                          map.get( i ) );
        }

    }
View Full Code Here

Examples of org.drools.core.util.PrimitiveLongMap

        }

    }

    public void testGetWithNegativeKeyReturnsNull() {
        final PrimitiveLongMap map = new PrimitiveLongMap( 2,
                                                           1 );

        assertNull( map.get( -1 ) );
    }
View Full Code Here

Examples of org.drools.core.util.PrimitiveLongMap

        assertNull( map.get( -1 ) );
    }

    public void testRemoveWithNegativeReturnsNull() {
        final PrimitiveLongMap map = new PrimitiveLongMap( 2,
                                                           1 );

        assertNull( map.remove( -1 ) );
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.