01: /*
02: * Copyright 2007 Google Inc.
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License"); you may not
05: * use this file except in compliance with the License. You may obtain a copy of
06: * the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12: * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13: * License for the specific language governing permissions and limitations under
14: * the License.
15: */
16: package java.util;
17:
18: /**
19: * Represents a set of unique objects. <a
20: * href="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Set.html">[Sun docs]</a>
21: *
22: * @param <E> element type.
23: */
24: public interface Set<E> extends Collection<E> {
25:
26: boolean add(E o);
27:
28: boolean addAll(Collection<? extends E> c);
29:
30: void clear();
31:
32: boolean contains(Object o);
33:
34: boolean containsAll(Collection<?> c);
35:
36: boolean equals(Object o);
37:
38: int hashCode();
39:
40: boolean isEmpty();
41:
42: Iterator<E> iterator();
43:
44: boolean remove(Object o);
45:
46: boolean removeAll(Collection<?> c);
47:
48: boolean retainAll(Collection<?> c);
49:
50: int size();
51:
52: Object[] toArray();
53:
54: <T> T[] toArray(T[] a);
55:
56: }
|