Examples of lastEntry()


Examples of java.util.NavigableMap.lastEntry()

        assertNotNull(descendingMap.comparator());

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

        assertEquals(navigableMap_startExcluded_endIncluded.lastKey(),
                descendingMap.firstKey());
        assertEquals(navigableMap_startExcluded_endIncluded.lastEntry(),
                descendingMap.firstEntry());
View Full Code Here

Examples of java.util.NavigableMap.lastEntry()

        assertNotNull(descendingMap.comparator());

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

        assertEquals(navigableMap_startIncluded_endExcluded.lastKey(),
                descendingMap.firstKey());
        assertEquals(navigableMap_startIncluded_endExcluded.lastEntry(),
                descendingMap.firstEntry());
View Full Code Here

Examples of java.util.NavigableMap.lastEntry()

        assertNotNull(descendingMap.comparator());

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

        assertEquals(navigableMap_startIncluded_endIncluded.lastKey(),
                descendingMap.firstKey());
        assertEquals(navigableMap_startIncluded_endIncluded.lastEntry(),
                descendingMap.firstEntry());
View Full Code Here

Examples of java.util.TreeMap.lastEntry()

       
        q.put(ZERO, ZERO);
        r.putAll(this.coeffs);
       
        while (!isZero(r) && bdeg.le(r.lastKey())) {
            c = new Division(r.lastEntry().getValue(), bc).evaluate();
            n = (NaturalNumber) r.lastKey().subtract(bdeg);
           
            q.put(n, c);
           
            for (NaturalNumber i : b.coeffs.descendingKeySet()) {
View Full Code Here

Examples of java.util.TreeMap.lastEntry()

        TreeMap treeMap = new TreeMap(tm);
        assertEquals(tm.size(), treeMap.size());
        assertEquals(tm.firstKey(), treeMap.firstKey());
        assertEquals(tm.firstEntry(), treeMap.firstEntry());
        assertEquals(tm.lastKey(), treeMap.lastKey());
        assertEquals(tm.lastEntry(), treeMap.lastEntry());
        assertEquals(tm.keySet(), treeMap.keySet());

        String key = new Integer(100).toString();
        assertEquals(tm.ceilingKey(key), treeMap.ceilingKey(key));
        assertEquals(tm.ceilingEntry(key), treeMap.ceilingEntry(key));
View Full Code Here

Examples of java.util.TreeMap.lastEntry()

            treeMap.lastKey();
            fail("should throw NoSuchElementException");
        } catch (NoSuchElementException e) {
            // Expected
        }
        assertNull(treeMap.lastEntry());

        try {
            treeMap.ceilingKey(1);
        } catch (NoSuchElementException e) {
            // Expected
View Full Code Here

Examples of java.util.TreeMap.lastEntry()

        TreeMap tm = new TreeMap();
        for(String s : separators) {
            tm.put(line.split(Pattern.quote(s)).length, s);
        }

        char separator = tm.lastEntry().getValue().toString().charAt(0);

        Crawler.logger.debug("Detected separator: " + separator);

        return separator;
    }
View Full Code Here

Examples of org.exist.storage.journal.JournalReader.lastEntry()

      final JournalReader reader = new JournalReader(broker, last, lastNum);
            try {
              // try to read the last log record to see if it is a checkpoint
              boolean checkpointFound = false;
          try {
                    final Loggable lastLog = reader.lastEntry();
                    if (lastLog != null && lastLog.getLogType() == LogEntryTypes.CHECKPOINT) {
                      final Checkpoint checkpoint = (Checkpoint) lastLog;
                      // Found a checkpoint. To be sure it is indeed a valid checkpoint
                      // record, we compare the LSN stored in it with the current LSN.
                      if (checkpoint.getStoredLsn() == checkpoint.getLsn()) {
View Full Code Here

Examples of org.xtreemfs.babudb.index.LSMTree.lastEntry()

        // first entry, current tree
        assertEquals(map3.firstEntry().getKey(), tree.firstEntry().getKey());
        assertEquals(map3.firstEntry().getValue(), tree.firstEntry().getValue());
       
        // last entry, current tree
        assertEquals(map3.lastEntry().getKey(), tree.lastEntry().getKey());
        assertEquals(map3.lastEntry().getValue(), tree.lastEntry().getValue());
       
        // first entry, snapshot 2
        assertEquals(map2.firstEntry().getKey(), tree.firstEntry(snap2).getKey());
        assertEquals(map2.firstEntry().getValue(), tree.firstEntry(snap2).getValue());
View Full Code Here

Examples of org.xtreemfs.babudb.index.LSMTree.lastEntry()

        assertEquals(map3.firstEntry().getKey(), tree.firstEntry().getKey());
        assertEquals(map3.firstEntry().getValue(), tree.firstEntry().getValue());
       
        // last entry, current tree
        assertEquals(map3.lastEntry().getKey(), tree.lastEntry().getKey());
        assertEquals(map3.lastEntry().getValue(), tree.lastEntry().getValue());
       
        // first entry, snapshot 2
        assertEquals(map2.firstEntry().getKey(), tree.firstEntry(snap2).getKey());
        assertEquals(map2.firstEntry().getValue(), tree.firstEntry(snap2).getValue());
       
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.