All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.yy.androidlib.util.apache.MapWithIndex Maven / Gradle / Ivy

There is a newer version: 1.0.5
Show newest version
package com.yy.androidlib.util.apache;

import java.util.HashMap;

public class MapWithIndex extends HashMap {
    public K keyAt(int index) {
        int i = 0;
        for (K key : keySet()) {
            if (i == index) {
                return key;
            }
            ++i;
        }
        return null;
    }

    public V valueAt(int index) {
        return get(keyAt(index));
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy