LRU Cache implementation in java