Code example for Map.Entry

Methods: getKey, getValue

0
    } 
 
    public String getFunction(int addr) {
        AddressRange key = new AddressRange(addr, addr);
        Entry<AddressRange, String> closestEntry = startAddrForFunc.floorEntry(key);
        AddressRange closestAddressRange = closestEntry.getKey();
        return closestAddressRange != null && closestAddressRange.inRange(addr) ? closestEntry.getValue() : null;
    } 
     
    /* (non-Javadoc) 
     * @see com.mobilesorcery.sdk.core.ISLDInfo#write(java.io.Writer) 
     */ 
    public void write(Writer writer) throws IOException {
        writer.write(SLDParser.FILE_MARKER);
        writer.write('\n');
        for (Iterator<Integer> files = fileTable.keySet().iterator(); files.hasNext();) {
            Integer fileId = files.next();
            String filename = fileTable.get(fileId);
            writer.write(fileId + ":" + filename);
            writer.write('\n');
        }