source code formatting.
[utils] / support / general / src / main / java / org / wamblee / cache / ZeroCache.java
1 /*
2  * Copyright 2005 the original author or authors.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 package org.wamblee.cache;
17
18 import java.io.Serializable;
19
20
21 /**
22  * A cache that does not cache. This implementation is useful for disabling
23  * caching. Because of this implementation, application code does not need to
24  * distinguish between the situation where it a cache is used and where it
25  * isn't.
26  *
27  * @author Erik Brakkee
28  *
29  * @param <KeyType> DOCUMENT ME!
30  * @param <ValueType> DOCUMENT ME!
31  */
32 public class ZeroCache<KeyType extends Serializable, ValueType extends Serializable>
33     implements Cache<KeyType, ValueType> {
34     /**
35      * Creates a new ZeroCache object.
36      */
37     public ZeroCache() {
38         // Empty. 
39     }
40
41     /* (non-Javadoc)
42      * @see org.wamblee.cache.Cache#put(KeyType, ValueType)
43      */
44     /**
45      * DOCUMENT ME!
46      *
47      * @param aKey DOCUMENT ME!
48      * @param aValue DOCUMENT ME!
49      */
50     public void put(KeyType aKey, ValueType aValue) {
51         // Empty.    
52     }
53
54     /* (non-Javadoc)
55      * @see org.wamblee.cache.Cache#get(KeyType)
56      */
57     /**
58      * DOCUMENT ME!
59      *
60      * @param aKey DOCUMENT ME!
61      *
62      * @return DOCUMENT ME!
63      */
64     public ValueType get(KeyType aKey) {
65         return null;
66     }
67
68     /* (non-Javadoc)
69      * @see org.wamblee.cache.Cache#remove(KeyType)
70      */
71     /**
72      * DOCUMENT ME!
73      *
74      * @param aKey DOCUMENT ME!
75      */
76     public void remove(KeyType aKey) {
77         // Empty   
78     }
79
80     /* (non-Javadoc)
81      * @see org.wamblee.cache.Cache#clear()
82      */
83     /**
84      * DOCUMENT ME!
85      */
86     public void clear() {
87         // Empty   
88     }
89 }