Code example for SortedMap

Methods: isEmptyputlastKey

0
    void close(long entryId) {
        close = entryId;
    } 
     
    void addEnsemble(long startEntryId, ArrayList<InetSocketAddress> ensemble) {
        assert ensembles.isEmpty() || startEntryId >= ensembles.lastKey();
 
        ensembles.put(startEntryId, ensemble);
        currentEnsemble = ensemble;
    } 
 
    ArrayList<InetSocketAddress> getEnsemble(long entryId) {
        // the head map cannot be empty, since we insert an ensemble for 
        // entry-id 0, right when we start 
        return ensembles.get(ensembles.headMap(entryId + 1).lastKey());
    } 
 
    /** 
     * the entry id > the given entry-id at which the next ensemble change takes 
     * place ( -1 if no further ensemble changes) 
Connect your IDE to all the code out there  Get Codota for Java