Examples of headMap()


Examples of java.util.TreeMap.headMap()

        Object comparable = super.evaluateLookup(event, context);
        if (comparable == null) {
            return null;
        }
        comparable = EventBeanUtility.coerce(comparable, coercionType);
        return CompositeIndexQueryRange.handle(event, index.headMap(comparable), null, result, next);
    }

    public Collection<EventBean> lookup(EventBean[] eventsPerStream, Map parent, Collection<EventBean> result, CompositeIndexQuery next, ExprEvaluatorContext context) {
        TreeMap index = (TreeMap) parent;
        Object comparable = super.evaluatePerStream(eventsPerStream, context);
View Full Code Here

Examples of java.util.TreeMap.headMap()

        Object comparable = super.evaluatePerStream(eventsPerStream, context);
        if (comparable == null) {
            return null;
        }
        comparable = EventBeanUtility.coerce(comparable, coercionType);
        return CompositeIndexQueryRange.handle(eventsPerStream, index.headMap(comparable), null, result, next);
    }
}
View Full Code Here

Examples of java.util.TreeMap.headMap()

        Object comparable = super.evaluateLookup(event, context);
        if (comparable == null) {
            return null;
        }
        comparable = EventBeanUtility.coerce(comparable, coercionType);
        return CompositeIndexQueryRange.handle(event, index.headMap(comparable, true), null, result, next);
    }

    public Collection<EventBean> lookup(EventBean[] eventPerStream, Map parent, Collection<EventBean> result, CompositeIndexQuery next, ExprEvaluatorContext context) {
        TreeMap index = (TreeMap) parent;
        Object comparable = super.evaluatePerStream(eventPerStream, context);
View Full Code Here

Examples of java.util.TreeMap.headMap()

        Object comparable = super.evaluatePerStream(eventPerStream, context);
        if (comparable == null) {
            return null;
        }
        comparable = EventBeanUtility.coerce(comparable, coercionType);
        return CompositeIndexQueryRange.handle(eventPerStream, index.headMap(comparable, true), null, result, next);
    }
}
View Full Code Here

Examples of java.util.TreeMap.headMap()

                }
                if (!products.containsKey(productId)) {
                    continue;
                }
                TreeMap productMap = (TreeMap)products.get(productId);
                SortedMap subsetMap = productMap.headMap(requiredByDate);
                // iterate and 'reserve'
                Iterator subsetMapKeysIt = subsetMap.keySet().iterator();
                while (subsetMapKeysIt.hasNext()) {
                    Timestamp currentDate = (Timestamp)subsetMapKeysIt.next();
                    Map currentDateMap = (Map) subsetMap.get(currentDate);
View Full Code Here

Examples of java.util.TreeMap.headMap()

                }
                if (!products.containsKey(productId)) {
                    continue;
                }
                TreeMap productMap = (TreeMap)products.get(productId);
                SortedMap subsetMap = productMap.headMap(requiredByDate);
                // iterate and 'reserve'
                Iterator subsetMapKeysIt = subsetMap.keySet().iterator();
                while (subsetMapKeysIt.hasNext()) {
                    Timestamp currentDate = (Timestamp)subsetMapKeysIt.next();
                    Map currentDateMap = (Map) subsetMap.get(currentDate);
View Full Code Here

Examples of java.util.concurrent.ConcurrentNavigableMap.headMap()

    /**
     * headMap returns map with keys in requested range
     */
    public void testHeadMapContents() {
        ConcurrentNavigableMap map = map5();
        SortedMap sm = map.headMap(four);
        assertTrue(sm.containsKey(one));
        assertTrue(sm.containsKey(two));
        assertTrue(sm.containsKey(three));
        assertFalse(sm.containsKey(four));
        assertFalse(sm.containsKey(five));
View Full Code Here

Examples of org.apache.commons.collections.SortedBidiMap.headMap()

        Object toKey = it.next();
        Object second = it.next();
        Object firstValue = sm.get(first);
        Object secondValue = sm.get(second);
       
        SortedMap head = sm.headMap(toKey);
        assertEquals(1, head.size());
        assertEquals(true, sm.containsKey(first));
        assertEquals(true, head.containsKey(first));
        assertEquals(true, sm.containsValue(firstValue));
        assertEquals(true, head.containsValue(firstValue));
View Full Code Here

Examples of org.apache.commons.collections.SortedBidiMap.headMap()

       
        Object firstValue = sm.get(first);
        Object secondValue = sm.get(second);
        Object toKeyValue = sm.get(toKey);
       
        SortedMap sub = sm.headMap(toKey);
        int size = sm.size();
        assertEquals(2, sub.size());
        sub.clear();
        assertEquals(0, sub.size());
        assertEquals(size - 2, sm.size());
View Full Code Here

Examples of org.apache.commons.collections.SortedBidiMap.headMap()

        Object first = it.next();
        Object second = it.next();
        Object toKey = it.next();
       
        int size = sm.size();
        SortedMap sub = sm.headMap(toKey);
        assertEquals(2, sub.size());
        assertEquals(true, sm.containsKey(first));
        assertEquals(true, sub.containsKey(first));
        assertEquals(true, sm.containsKey(second));
        assertEquals(true, sub.containsKey(second));
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.