Code example for TreeMap

Methods: isEmptyfloorEntry

0
        addrToLine.put(addr, lineInFile);
        addrToFile.put(addr, fileId);
    } 
 
    public String getFileName(int addr) {
        if (addrToFile.isEmpty()) {
            return null; 
        } 
 
        Entry<Integer, Integer> entry = addrToFile.floorEntry(addr);
        if (entry != null) {
            Integer fileId = entry.getValue();
            if (fileId != null) {
                return fileTable.get(fileId);
            } 
        } 
 
        return null; 
    } 
 
    public int getLine(int addr) {