int indexOfValue(Object value) {
        final int N = mSize*2;
        final Object[] array = mArray;
        if (value == null) {
            for (int i=1; i<N; i+=2) {
                if (array[i] == null) {
                    return i>>1;
                }
            }
        } else {
            for (int i=1; i<N; i+=2) {
                if (value.equals(array[i])) {
                    return i>>1;
                }
            }
        }
        return -1;
    }
Returns the index of a key in the set.

@param key The key to search for.
@return Returns the index of the key if it exists, else a negative integer.
replugin-host-library/replugin-host-lib/src/main/java/com/qihoo360/replugin/utils/basic/SimpleArrayMap.java