KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > ozoneDB > collections > OzoneMap


1 // You can redistribute this software and/or modify it under the terms of
2
// the Ozone Library License version 1 published by ozone-db.org.
3
//
4
// This file is
5
// Copyright (C) 2002-@year@ Leo Mekenkamp. All rights reserved.
6
// $Id: OzoneMap.java,v 1.2 2003/01/27 17:41:36 leomekenkamp Exp $
7

8 package org.ozoneDB.collections;
9
10 import java.io.Serializable JavaDoc;
11 import java.util.Map JavaDoc;
12 import org.ozoneDB.OzoneRemote;
13
14 /**
15  * See the overall description on {@link org.ozoneDB.collections.OzoneCollection}.
16  * <br/>Although a <code>Map</code> is technically not a <code>Collection</code>,
17  * there are enough similarities to justify placing the <code>OzoneMap</code>
18  * and its derived classes and interfaces into the <code>org.ozoneDB.collections</code>
19  * package.
20  * @author <a HREF="mailto:ozoneATmekenkampD0Tcom">Leo Mekenkamp (mind the anti-sp@m)</a>
21  */

22 public interface OzoneMap extends Map JavaDoc, OzoneRemote {
23     
24     public void clear(); /*update*/
25     
26     public Object JavaDoc put(Object JavaDoc key, Object JavaDoc value); /*update*/
27
28     public void putAll(Map JavaDoc map); /*update*/
29     
30     public Object JavaDoc remove(Object JavaDoc key); /*update*/
31     
32     /**
33      * <p>Returns a <code>Map</code> that contains the same entries as this
34      * persistent one; it is (by nature of the client-server enviromnent) always
35      * a 'deep' copy of this <code>OzoneMap</code>. I.e. the contents of
36      * this <code>OzoneMap</code> instance are always copied to the client
37      * by use of serialization.</p>
38      */

39     public Map JavaDoc getClientMap();
40     
41     /**
42      * Basically nothing more than a typecasted call to <code>keySet()</code>,
43      * as key sets are ozone objects themselves.
44      *
45      * @return OzoneSet containing all keys in this map
46      */

47     public OzoneSet ozoneKeySet();
48     
49     /**
50      * Basically nothing more than a typecasted call to <code>entrySet()</code>,
51      * as an entry set is an ozone objects ifself.
52      *
53      * @return OzoneSet containing all keys in this map
54      */

55     public OzoneSet ozoneEntrySet();
56     
57     /**
58      * Basically nothing more than a typecasted call to <code>values()</code>,
59      * as the values collection is am ozone object itself.
60      *
61      * @return OzoneSet containing all keys in this map
62      */

63     public OzoneCollection ozoneValues();
64     
65     /**
66      *
67      * @author <a HREF="mailto:ozoneATmekenkampD0Tcom">Leo Mekenkamp (mind the anti-sp@m)</a>
68      */

69     interface Node extends Map.Entry JavaDoc, Serializable JavaDoc {
70
71         public void setKey(Object JavaDoc key);
72
73     }
74     
75 }
Popular Tags