Examples of lastKey()


Examples of com.opengamma.analytics.math.interpolation.data.Interpolator1DDataBundle.lastKey()

      final InterpolatedDoublesCurve interpolatedCurve = (InterpolatedDoublesCurve) curve;

      // This is a hack for now as it's all about to change
      final Interpolator1DDataBundle interpolatorBundle = interpolatedCurve.getDataBundle();
      final double first = interpolatorBundle.firstKey();
      final double last = interpolatorBundle.lastKey();

      return interpolateCurve(curve, first, last);

    } else {
      final double first = 1. / 12;
View Full Code Here

Examples of edu.stanford.ppl.concurrent.SnapTreeMap.lastKey()

    /**
     *   lastKey returns last key
     */
    public void testLastKey() {
        SnapTreeMap map = map5();
        assertEquals(five, map.lastKey());
    }


    /**
     *  keySet.toArray returns contains all keys
View Full Code Here

Examples of java.util.NavigableMap.lastKey()

        assertEquals(navigableMap_startExcluded_endExcluded.size(),
                descendingMap.size());
        assertNotNull(descendingMap.comparator());

        assertEquals(navigableMap_startExcluded_endExcluded.firstKey(),
                descendingMap.lastKey());
        assertEquals(navigableMap_startExcluded_endExcluded.firstEntry(),
                descendingMap.lastEntry());

        assertEquals(navigableMap_startExcluded_endExcluded.lastKey(),
                descendingMap.firstKey());
View Full Code Here

Examples of java.util.SortedMap.lastKey()

            ListEventToBytes.toListEvent(update, this, byteCoder);
        }

        // prepare the next update id to use
        if(!sequentialUpdates.isEmpty()) {
            nextUpdateId = ((Integer)sequentialUpdates.lastKey()).intValue() + 1;
        }

        // now that we're up-to-date, listen for further events
        source.addListEventListener(this);
    }
View Full Code Here

Examples of java.util.SortedMap.lastKey()

            fail("Null value should raise IllegalArgument");
        } catch (IllegalArgumentException e) {
            // expected
        }
        assertEquals("First key should be A", map.firstKey(), "A");
        assertEquals("Last key should be C", map.lastKey(), "C");
        assertEquals("First key in tail map should be B",
            map.tailMap("B").firstKey(), "B");
        assertEquals("Last key in head map should be B",
            map.headMap("C").lastKey(), "B");
        assertEquals("Last key in submap should be B",
View Full Code Here

Examples of java.util.SortedMap.lastKey()

        SortedMap sm = (SortedMap) makeFullMap();
        Object obj = null;
        for (Iterator it = sm.keySet().iterator(); it.hasNext();) {
            obj = (Object) it.next();
        }
        assertSame(obj, sm.lastKey());
    }
   
    //-----------------------------------------------------------------------   
    public BulkTest bulkTestHeadMap() {
        return new TestHeadMap(this);
View Full Code Here

Examples of java.util.SortedMap.lastKey()

        SortedMap skipMap = getSkipMap();
        synchronized (skipMap) {
            SortedMap head = skipMap.headMap(new Long(time));
            if (!head.isEmpty()) {
                eventBundleBuffer.clear();
                lastRevision = (Long) head.get(head.lastKey());
            }
        }

        try {
            while (hasNext()) {
View Full Code Here

Examples of java.util.SortedMap.lastKey()

        SortedMap sm = (SortedMap) maps[0];
        SortedMap hm = sm.headMap(key);
        if (hm.isEmpty()) {
            return null;
        }
        return hm.lastKey();
    }

    //-----------------------------------------------------------------------
    /**
     * Obtains an ordered map iterator.
View Full Code Here

Examples of java.util.SortedMap.lastKey()

        SortedMap sm = (SortedMap) makeFullMap();
        Object obj = null;
        for (Iterator it = sm.keySet().iterator(); it.hasNext();) {
            obj = (Object) it.next();
        }
        assertSame(obj, sm.lastKey());
    }
   
    //-----------------------------------------------------------------------   
    public BulkTest bulkTestHeadMap() {
        return new TestHeadMap(this);
View Full Code Here

Examples of java.util.SortedMap.lastKey()

            fail("Null value should raise IllegalArgument");
        } catch (IllegalArgumentException e) {
            // expected
        }
        assertEquals("First key should be A", map.firstKey(), "A");
        assertEquals("Last key should be C", map.lastKey(), "C");
        assertEquals("First key in tail map should be B",
            map.tailMap("B").firstKey(), "B");
        assertEquals("Last key in head map should be B",
            map.headMap("C").lastKey(), "B");
        assertEquals("Last key in submap should be B",
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.