Package com.nomagic.magicdraw.annotation
Class AnnotationSubset
- java.lang.Object
-
- com.nomagic.magicdraw.annotation.AnnotationSubset
-
@OpenApiAll public final class AnnotationSubset extends java.lang.ObjectDefines a subset of registered annotations. Used to filter annotations when retrieving them from theAnnotationManagerAnnotationSubset.ALLmeans any registered annotation.
-
-
Field Summary
Fields Modifier and Type Field Description static AnnotationSubsetALL
-
Constructor Summary
Constructors Constructor Description AnnotationSubset(java.util.Collection<AnnotationCategory> included, java.util.Collection<AnnotationCategory> excluded, java.util.Comparator<Annotation> comparator)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static AnnotationSubsetallExcluding(java.util.Collection<AnnotationCategory> excludedCategories, java.util.Comparator<Annotation> comparator)booleancontainsCategory(AnnotationCategory category)booleanequals(java.lang.Object o)java.util.Comparator<Annotation>getComparator()java.util.Collection<AnnotationCategory>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 subsetjava.util.Collection<AnnotationCategory>getIncludedCategories()If included categories are empty, then every possible category is contained by this subset, except the excluded ones.inthashCode()static AnnotationSubsetincludingOnly(java.util.Collection<AnnotationCategory> includedCategories, java.util.Comparator<Annotation> comparator)
-
-
-
Field Detail
-
ALL
public static final AnnotationSubset ALL
-
-
Constructor Detail
-
AnnotationSubset
public AnnotationSubset(java.util.Collection<AnnotationCategory> included, java.util.Collection<AnnotationCategory> excluded, @CheckForNull java.util.Comparator<Annotation> comparator)
-
-
Method Detail
-
allExcluding
public static AnnotationSubset allExcluding(java.util.Collection<AnnotationCategory> excludedCategories, @CheckForNull java.util.Comparator<Annotation> comparator)
-
includingOnly
public static AnnotationSubset includingOnly(java.util.Collection<AnnotationCategory> includedCategories, @CheckForNull java.util.Comparator<Annotation> comparator)
- Returns:
- AnnotationSubset for any annotation group with the given scope
-
containsCategory
public boolean containsCategory(AnnotationCategory category)
- Returns:
- true if the given annotation category belongs to this subset
-
getIncludedCategories
public java.util.Collection<AnnotationCategory> getIncludedCategories()
If included categories are empty, then every possible category is contained by this subset, except the excluded ones.
-
getExcludedCategories
public java.util.Collection<AnnotationCategory> 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
@CheckForNull public java.util.Comparator<Annotation> getComparator()
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-