Package krati.store

Examples of krati.store.DynamicDataSet.capacity()


        }
    }
   
    protected void doInitialCapacity(int initialCapacity) throws Exception {
        DynamicDataSet store = create(initialCapacity);
        int capacity = store.capacity();
        if(initialCapacity == DynamicConstants.SUB_ARRAY_SIZE) {
            assertEquals(initialCapacity, capacity);
        } else {
            assertTrue(capacity >= initialCapacity);
        }
View Full Code Here


        }
        store.close();

        int initialCapacity2 = capacity + _rand.nextInt(capacity);
        DynamicDataSet store2 = create(initialCapacity2);
        assertEquals(capacity, store2.capacity());
        store2.close();

        int initialCapacity3 = capacity - _rand.nextInt(capacity);
        DynamicDataSet store3 = create(initialCapacity3);
        assertEquals(capacity, store3.capacity());
View Full Code Here

        assertEquals(capacity, store2.capacity());
        store2.close();

        int initialCapacity3 = capacity - _rand.nextInt(capacity);
        DynamicDataSet store3 = create(initialCapacity3);
        assertEquals(capacity, store3.capacity());
        store3.close();
    }
   
    public void testInitialCapacity1() throws Exception {
        doInitialCapacity(DynamicConstants.SUB_ARRAY_SIZE);
View Full Code Here

    }
   
    protected void doInitialCapacityLevel(int initLevel) throws Exception {
        int initialCapacity = DynamicConstants.SUB_ARRAY_SIZE << initLevel;
        DynamicDataSet store = create(initialCapacity);
        int capacity = store.capacity();
        assertEquals(initialCapacity, capacity);
        store.close();
       
        int initialCapacity2 = capacity + _rand.nextInt(capacity);
        DynamicDataSet store2 = create(initialCapacity2);
View Full Code Here

        assertEquals(initialCapacity, capacity);
        store.close();
       
        int initialCapacity2 = capacity + _rand.nextInt(capacity);
        DynamicDataSet store2 = create(initialCapacity2);
        assertEquals(capacity, store2.capacity());
        store2.close();
       
        int initialCapacity3 = capacity - _rand.nextInt(capacity);
        DynamicDataSet store3 = create(initialCapacity3);
        assertEquals(capacity, store3.capacity());
View Full Code Here

        assertEquals(capacity, store2.capacity());
        store2.close();
       
        int initialCapacity3 = capacity - _rand.nextInt(capacity);
        DynamicDataSet store3 = create(initialCapacity3);
        assertEquals(capacity, store3.capacity());
        store3.close();
    }
   
    public void testInitialCapacityLevel0() throws Exception {
        doInitialCapacityLevel(0);
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.