comparison java/src/java/util/AbstractSet.d @ 10:eb8ff453285d

Added java.util collection classes.
author Frank Benoit <benoit@tionex.de>
date Fri, 13 Mar 2009 16:57:07 +0100
parents
children 9b96950f2c3c
comparison
equal deleted inserted replaced
9:950d84783eac 10:eb8ff453285d
1 module java.util.AbstractSet;
2
3 import java.lang.all;
4 import java.util.Set;
5 import java.util.Collection;
6 import java.util.Iterator;
7 import java.util.AbstractCollection;
8
9 abstract class AbstractSet : AbstractCollection, Set {
10 this(){
11 }
12 int opEquals(Object o){
13 implMissing( __FILE__, __LINE__ );
14 return 0;
15 }
16 hash_t toHash(){
17 implMissing( __FILE__, __LINE__ );
18 return 0;
19 }
20 bool removeAll(Collection c){
21 return super.removeAll(c);
22 }
23 public abstract bool add(Object o);
24 public abstract bool add(String o);
25 public abstract bool addAll(Collection c);
26 public abstract void clear();
27 public abstract bool contains(Object o);
28 public abstract bool contains(String o);
29 public abstract bool containsAll(Collection c);
30
31
32 public abstract bool isEmpty();
33 public abstract Iterator iterator();
34 public abstract bool remove(Object o);
35 public abstract bool remove(String o);
36 public abstract bool removeAll(Collection c);
37 public abstract bool retainAll(Collection c);
38 public abstract int size();
39 public abstract Object[] toArray();
40 public abstract Object[] toArray(Object[] a);
41 public abstract String toString(){
42 return super.toString();
43 }
44
45 // only for D
46 public abstract int opApply (int delegate(ref Object value) dg);
47 }
48