FileDocCategorySizeDatePackage
AddressMap.javaAPI DocAndroid 5.1 API1507Thu Mar 12 22:18:30 GMT 2015com.android.dx.io.instructions

AddressMap

public final class AddressMap extends Object
Map from addresses to addresses, where addresses are all {@code int}s.

Fields Summary
private final HashMap
map
underlying map. TODO: This might be too inefficient.
Constructors Summary
public AddressMap()
Constructs an instance.

        map = new HashMap<Integer,Integer>();
    
Methods Summary
public intget(int keyAddress)
Gets the value address corresponding to the given key address. Returns {@code -1} if there is no mapping.

        Integer value = map.get(keyAddress);
        return (value == null) ? -1 : value;
    
public voidput(int keyAddress, int valueAddress)
Sets the value address associated with the given key address.

        map.put(keyAddress, valueAddress);