KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > util > explorer > core > common > api > ContextContainer


1 /*====================================================================
2
3 Objectweb Explorer Framework
4 Copyright (C) 2000-2004 INRIA - USTL - LIFL - GOAL
5 Contact: openccm@objectweb.org
6
7 This library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Lesser General Public
9 License as published by the Free Software Foundation; either
10 version 2.1 of the License, or any later version.
11
12 This library is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 Lesser General Public License for more details.
16
17 You should have received a copy of the GNU Lesser General Public
18 License along with this library; if not, write to the Free Software
19 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
20 USA
21
22 Initial developer(s): Jerome Moroy, Philippe Merle.
23 Contributor(s): ______________________________________.
24
25 ====================================================================*/

26 package org.objectweb.util.explorer.core.common.api;
27
28 import org.objectweb.util.explorer.api.Context;
29 import org.objectweb.util.explorer.api.Entry;
30
31 /**
32  * ContextContainer interface.
33  *
34  * @author <a HREF="mailto:Jerome.Moroy@lifl.fr">Jérôme Moroy</a>,
35  * <a HREF="mailto:Philippe.Merle@lifl.fr">Philippe Merle</a>.
36  *
37  * @version 0.1
38  */

39 public interface ContextContainer
40          extends Context
41 {
42
43     /**
44      * Returns the value of the entry identify by the given name
45      * @param name The key of the entry
46      * @return The value of the associated entry or null.
47      */

48     //public Object getLocalValue(String name);
49

50     /**
51      * Returns the entry identify by the given name
52      * @param name The key of the entry
53      * @return The associated entry or null.
54      */

55     public Entry getEntry(Object JavaDoc name);
56     
57     /**
58      * Adds an object into the container.
59      * If an entry with the same id already exists in the container,
60      * this one is replaced by the new value.
61      *
62      * This method does not modify the given name and the given value,
63      * but it modifies the target context.
64      *
65      * @param name The name of the entry to be retrieved.
66      * @param value The object to add
67      *
68      */

69     public void addEntry(Object JavaDoc name, Object JavaDoc value);
70
71     /**
72      * Adds an entry into the container.
73      * If an entry with the same id already exists in the container,
74      * this one is replaced by the new value.
75      *
76      * This method does not modify the given name and the given value,
77      * but it modifies the target context.
78      *
79      * @param name The name of the entry to be retrieved.
80      * @param value The object to add
81      *
82      */

83     public void addEntry(Entry entry);
84     
85     /**
86      * Removes the object corresponding to the given name from the context
87      * This method modifies the target context.
88      * @param name The name of the entry to be removed.
89      */

90     public void removeEntry(Object JavaDoc name);
91     
92     /**
93      * Removes all of the elements of this context.
94      */

95     public void clear();
96
97     /**
98      * Provides the number of entries contained into the given context
99      * @return The size of the context.
100      */

101     public int getSize();
102     
103 }
Popular Tags