Package com.nomagic.magicdraw.annotation
Class AnnotationSubset
java.lang.Object
com.nomagic.magicdraw.annotation.AnnotationSubset
Defines a subset of registered annotations.
Used to filter annotations when retrieving them from the
AnnotationManager
AnnotationSubset.ALL
means any registered annotation.-
Field Summary
-
Constructor Summary
ConstructorDescriptionAnnotationSubset
(Collection<AnnotationCategory> included, Collection<AnnotationCategory> excluded, Comparator<Annotation> comparator) -
Method Summary
Modifier and TypeMethodDescriptionstatic AnnotationSubset
allExcluding
(Collection<AnnotationCategory> excludedCategories, Comparator<Annotation> comparator) boolean
containsCategory
(AnnotationCategory category) boolean
Excluded categories, that are strictly not contained by this subset If category is both included and excluded, it is still not contained by this subsetIf included categories are empty, then every possible category is contained by this subset, except the excluded ones.int
hashCode()
static AnnotationSubset
includingOnly
(Collection<AnnotationCategory> includedCategories, Comparator<Annotation> comparator)
-
Field Details
-
ALL
-
-
Constructor Details
-
AnnotationSubset
public AnnotationSubset(Collection<AnnotationCategory> included, Collection<AnnotationCategory> excluded, @CheckForNull Comparator<Annotation> comparator)
-
-
Method Details
-
allExcluding
public static AnnotationSubset allExcluding(Collection<AnnotationCategory> excludedCategories, @CheckForNull Comparator<Annotation> comparator) -
includingOnly
public static AnnotationSubset includingOnly(Collection<AnnotationCategory> includedCategories, @CheckForNull Comparator<Annotation> comparator) - Returns:
- AnnotationSubset for any annotation group with the given scope
-
containsCategory
- Returns:
- true if the given annotation category belongs to this subset
-
getIncludedCategories
If included categories are empty, then every possible category is contained by this subset, except the excluded ones. -
getExcludedCategories
Excluded categories, that are strictly not contained by this subset If category is both included and excluded, it is still not contained by this subset -
getComparator
-
equals
-
hashCode
public int hashCode()
-