KickJava   Java API By Example, From Geeks To Geeks.

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


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: OzoneCollection.java,v 1.6 2003/11/27 15:55:11 leomekenkamp Exp $
7

8 package org.ozoneDB.collections;
9
10 import java.util.Collection JavaDoc;
11 import java.util.Iterator JavaDoc;
12 import org.ozoneDB.OzoneRemote;
13
14 /**
15  * An ozone aware collection.
16  *
17  * @author <a HREF="mailto:ozoneATmekenkampD0Tcom">Leo Mekenkamp (mind the anti-sp@m)</a>
18  */

19 public interface OzoneCollection extends Collection JavaDoc, OzoneRemote {
20
21     /** <p>Returns a non-ozone <code>Collection</code> that contains the same
22      * entries as this persistent one; it is (by nature of the client-server
23      * enviromnent) always a 'deep' copy of this <code>OzoneCollection</code>.
24      * I.e. the contents of this <code>OzoneCollection</code> instance are
25      * always copied to the client by use of serialization.</p>
26      * <p>This means that if this instance holds non-ozone objects, these
27      * objects are send to the calling client by means of serialization. If
28      * this instance holds ozone objects, it actually holds proxies to these
29      * objects. These proxies are copied and send to the client, resulting in
30      * different proxies to the same ozone objects.</p>
31      * <p>Note that all subclasses of <code>OzoneCollection</code> (or
32      * <code>OzoneMap</code>) have <code>getClientXxx()</code> member functions
33      * that return a collection of type <code>java.util.Xxx</code>; these simply
34      * return the same result value as <code>getClientCollection()</code>
35      * without the need for a typecast.</p>
36      */

37     public Collection JavaDoc getClientCollection();
38
39     public boolean add(Object JavaDoc obj); /*update*/
40
41     public boolean addAll(Collection JavaDoc c); /*update*/
42
43     public boolean remove(Object JavaDoc obj); /*update*/
44
45     public boolean removeAll(Collection JavaDoc c); /*update*/
46
47     public boolean retainAll(Collection JavaDoc c); /*update*/
48
49     public void clear(); /*update*/
50     
51     public Iterator JavaDoc _org_ozoneDB_internalIterator();
52     
53 }
Popular Tags