Returns a boolean specifying whether or not an element with the specified key is in the cache. If the requested element hasExpired, it is removed before it is looked up which causes the function to return false. @param key The key for the element, used to reference it in the hastables
(Object key)
| 415 | * specified key, otherwise false |
| 416 | */ |
| 417 | public boolean containsKey(Object key) { |
| 418 | CacheLine line = (CacheLine) cacheLineTable.get(key); |
| 419 | |
| 420 | if (hasExpired(line)) { |
| 421 | removeObject(key); |
| 422 | line = null; |
| 423 | } |
| 424 | if (line != null) { |
| 425 | return true; |
| 426 | } else { |
| 427 | return false; |
| 428 | } |
| 429 | } |
| 430 | |
| 431 | /** |
| 432 | * Returns a boolean specifying whether or not the element corresponding to |