1 package com.atlassian.cache.impl;
2
3 import com.atlassian.cache.CacheEntryEvent;
4
5 import javax.annotation.Nonnull;
6
7 import static com.google.common.base.Preconditions.checkNotNull;
8
9
10
11
12 public class DefaultCacheEntryEvent<K, V> implements CacheEntryEvent<K, V>
13 {
14 private final K key;
15 private final V value;
16 private final V oldValue;
17
18 public DefaultCacheEntryEvent(@Nonnull K key, V value, V oldValue)
19 {
20 this.key = checkNotNull(key);
21 this.value = value;
22 this.oldValue = oldValue;
23 }
24
25 @Override
26 @Nonnull
27 public K getKey()
28 {
29 return key;
30 }
31
32 @Override
33 public V getValue()
34 {
35 return value;
36 }
37
38 @Override
39 public V getOldValue()
40 {
41 return oldValue;
42 }
43 }