Code example for SparseArray

Methods: get

0
                return defaultValue;
            else 
                throw new NoMatchException("no match found for uri: " + uri);
        } 
        if (transformer != null) {
            return transformer.onResponse(uri, uriToUrl.get(match));
        } 
        return uriToUrl.get(match);
    } 
 
    public static class NoMatchException extends RuntimeException {
        public NoMatchException(String string) {
            super(string);
        } 
 
        private static final long serialVersionUID = 1705583377032327225L;
    } 
 
    /* package */void clear() { 
        matcher = new UriMatcher(UriMatcher.NO_MATCH);
        uriToUrl.clear();