Class AnnotationBag
- java.lang.Object
-
- org.eclipse.jface.text.source.Annotation
-
- org.eclipse.jface.text.source.projection.AnnotationBag
-
public class AnnotationBag extends Annotation
A bag of annotations.This class is not intended to be subclassed.
- Since:
- 3.0
- Restriction:
- This class is not intended to be subclassed by clients.
-
-
Field Summary
-
Fields inherited from class org.eclipse.jface.text.source.Annotation
TYPE_UNKNOWN
-
-
Constructor Summary
Constructors Constructor Description AnnotationBag(String type)Creates a new annotation bag.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(Annotation annotation)Adds the given annotation to the annotation bag.booleanisEmpty()Returns whether the annotation bag is empty.Iterator<Annotation>iterator()Returns an iterator for all annotation inside this annotation bag ornullif the bag is empty.voidremove(Annotation annotation)Removes the given annotation from the annotation bag.-
Methods inherited from class org.eclipse.jface.text.source.Annotation
getText, getType, isMarkedDeleted, isPersistent, markDeleted, setText, setType
-
-
-
-
Constructor Detail
-
AnnotationBag
public AnnotationBag(String type)
Creates a new annotation bag.- Parameters:
type- the annotation type
-
-
Method Detail
-
add
public void add(Annotation annotation)
Adds the given annotation to the annotation bag.- Parameters:
annotation- the annotation to add
-
remove
public void remove(Annotation annotation)
Removes the given annotation from the annotation bag.- Parameters:
annotation- the annotation to remove
-
isEmpty
public boolean isEmpty()
Returns whether the annotation bag is empty.- Returns:
trueif the annotation bag is empty,falseotherwise
-
iterator
public Iterator<Annotation> iterator()
Returns an iterator for all annotation inside this annotation bag ornullif the bag is empty.- Returns:
- an iterator for all annotations in the bag or
null - Since:
- 3.1
-
-