public boolean containsKey ( Object key ) { if ( ! cache . containsKey ( key ) ) { return false ; } else { SoftReference < T > ref = cache . get ( key ) ; T ob = ref . get ( ) ; if ( ob == null ) { release ( key ) ; return false ; } if ( ob instanceof CachedItem ) { if ( ! ( ( CachedItem ) ob ) . isValidForCache ( ) ) { release ( key ) ; return false ; } } return true ; } }
Checks if an object with the specified key is in the cache .