KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > lenya > ac > cache > CachedObject


1 /*
2  * Copyright 1999-2004 The Apache Software Foundation
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  */

17
18 package org.apache.lenya.ac.cache;
19
20 import org.apache.excalibur.source.SourceValidity;
21
22 /**
23  * Cached object.
24  * @version $Id: CachedObject.java 43238 2004-08-16 16:06:14Z andreas $
25  */

26 public class CachedObject {
27
28     private SourceValidity validityObject;
29     private Object JavaDoc value;
30     
31     /**
32      * Returns the value.
33      * @return An object.
34      */

35     public Object JavaDoc getValue() {
36         return value;
37     }
38
39     /**
40      * Returns the source validity.
41      * @return A source validity.
42      */

43     public SourceValidity getValidityObject() {
44         return validityObject;
45     }
46
47     /**
48      * Ctor.
49      * @param validity The source validity.
50      * @param value The value.
51      */

52     public CachedObject(SourceValidity validity, Object JavaDoc value) {
53         this.validityObject = validity;
54         this.value = value;
55     }
56
57 }
58
Popular Tags