Examples of firstKey()


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

    if (curve instanceof InterpolatedDoublesCurve) {
      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 {
View Full Code Here

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

    /**
     *   firstKey returns first key
     */
    public void testFirstKey() {
        SnapTreeMap map = map5();
        assertEquals(one, map.firstKey());
    }

    /**
     *   lastKey returns last key
     */
 
View Full Code Here

Examples of java.util.NavigableMap.firstKey()

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

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

        descendingMap = navigableMap_startExcluded_endIncluded.descendingMap();
        assertEquals(navigableMap_startExcluded_endIncluded.size(),
View Full Code Here

Examples of java.util.SortedMap.firstKey()

            map.put("D", null);
            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");
View Full Code Here

Examples of java.util.SortedMap.firstKey()

        // no tests I can think of
    }
   
    public void testFirstKey() {
        SortedMap sm = (SortedMap) makeFullMap();
        assertSame(sm.keySet().iterator().next(), sm.firstKey());
    }
   
    public void testLastKey() {
        SortedMap sm = (SortedMap) makeFullMap();
        Object obj = null;
View Full Code Here

Examples of java.util.SortedMap.firstKey()

    return scope;
  }

  public OID find(MOScope range) {
    SortedMap tail = vbs.tailMap(range.getLowerBound());
    OID first = (OID) tail.firstKey();
    if (range.getLowerBound().equals(first) && (!range.isLowerIncluded())) {
      if (tail.size() > 1) {
        Iterator it = tail.keySet().iterator();
        it.next();
        return (OID) it.next();
View Full Code Here

Examples of java.util.SortedMap.firstKey()

  }

  public boolean next(SubRequest request) {
    MOScope scope = request.getQuery().getScope();
    SortedMap tail = vbs.tailMap(scope.getLowerBound());
    OID first = (OID) tail.firstKey();
    if (scope.getLowerBound().equals(first) && (!scope.isLowerIncluded())) {
      if (tail.size() > 1) {
        Iterator it = tail.keySet().iterator();
        it.next();
        first = (OID)it.next();
View Full Code Here

Examples of java.util.SortedMap.firstKey()

        // no tests I can think of
    }
   
    public void testFirstKey() {
        SortedMap sm = (SortedMap) makeFullMap();
        assertSame(sm.keySet().iterator().next(), sm.firstKey());
    }
   
    public void testLastKey() {
        SortedMap sm = (SortedMap) makeFullMap();
        Object obj = null;
View Full Code Here

Examples of java.util.SortedMap.firstKey()

            map.put("D", null);
            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");
View Full Code Here

Examples of java.util.SortedMap.firstKey()

    public void testSortOrder() {
        SortedMap map = makeTestSortedMap(oneFactory);
        map.put("A""a");
        map.get("B"); // Entry with value "One" created
        map.put("C", "c");
        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");
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.