KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jface > text > source > IAnnotationMap


1 /*******************************************************************************
2  * Copyright (c) 2000, 2005 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.jface.text.source;
12
13
14 import java.util.Collection JavaDoc;
15 import java.util.Iterator JavaDoc;
16 import java.util.Map JavaDoc;
17 import java.util.Set JavaDoc;
18
19 import org.eclipse.jface.text.ISynchronizable;
20
21
22 /**
23  * An annotation map is a map specialized for the requirements of an annotation
24  * model. The annotation map supports a customizable lock object which is used
25  * to synchronize concurrent operations on the map (see
26  * {@link org.eclipse.jface.text.ISynchronizable}. The map supports two
27  * iterator methods, one for the values and one for the keys of the map. The
28  * returned iterators are robust, i.e. they work on a copy of the values and
29  * keys set that is made at the point in time the iterator methods are called.
30  * <p>
31  * The returned collections of the methods <code>values</code>,
32  * <code>entrySet</code>, and <code>keySet</code> are not synchronized on
33  * the annotation map's lock object.
34  * <p>
35  *
36  * @see org.eclipse.jface.text.source.IAnnotationModel
37  * @since 3.0
38  */

39 public interface IAnnotationMap extends Map JavaDoc, ISynchronizable {
40
41     /**
42      * Returns an iterator for a copy of this annotation map's values.
43      *
44      * @return an iterator for a copy of this map's values
45      */

46     Iterator JavaDoc valuesIterator();
47
48     /**
49      * Returns an iterator for a copy of this map's key set.
50      *
51      * @return an iterator for a copy of this map's key set
52      */

53     Iterator JavaDoc keySetIterator();
54
55     /**
56      * {@inheritDoc}
57      *
58      * The returned set is not synchronized on this annotation map's lock object.
59      */

60     Set JavaDoc entrySet();
61
62     /**
63      * {@inheritDoc}
64      *
65      * The returned set is not synchronized on this annotation map's lock object.
66      */

67     Set JavaDoc keySet();
68
69     /**
70      * {@inheritDoc}
71      *
72      * The returned collection is not synchronized on this annotation map's lock object.
73      */

74     Collection JavaDoc values();
75 }
76
Popular Tags