Package org.eclipse.ltk.core.refactoring
Class GroupCategorySet
java.lang.Object
org.eclipse.ltk.core.refactoring.GroupCategorySet
A special set to manage group categories. Group category sets are value
objects and are therefore best used as static final fields to share a
group category set between n
TextEditBasedChangeGroup
s.
Note: this class is not intended to be subclassed
- Since:
- 3.2
- Restriction:
- This class is not intended to be subclassed by clients.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final GroupCategorySet
Constant representing a group category set containing no group categories. -
Constructor Summary
ConstructorsConstructorDescriptionGroupCategorySet
(GroupCategory category) Creates a new list of group categories initialized with the given group category.GroupCategorySet
(GroupCategory[] categories) Creates a new set of group categories initialized from the given array of group categories -
Method Summary
Modifier and TypeMethodDescriptionasList()
Converts the group categories into a a unmodifiable list.boolean
contains
(GroupCategory category) Returns whether the given category is contained in this set of group categoriesboolean
containsOneCategory
(List<GroupCategory> categories) Returns whether one of the given categories is contained in this set of group categoriesstatic GroupCategorySet
union
(GroupCategorySet one, GroupCategorySet two) Creates a new group category set containing the union of the given two group category sets
-
Field Details
-
NONE
Constant representing a group category set containing no group categories.
-
-
Constructor Details
-
GroupCategorySet
Creates a new list of group categories initialized with the given group category.- Parameters:
category
- the first category
-
GroupCategorySet
Creates a new set of group categories initialized from the given array of group categories- Parameters:
categories
- the initial group categories
-
-
Method Details
-
union
Creates a new group category set containing the union of the given two group category sets- Parameters:
one
- the first set of group categoriestwo
- the second set of group categories- Returns:
- the union
-
contains
Returns whether the given category is contained in this set of group categories- Parameters:
category
- the category to test containment for- Returns:
true
if the category is contained in this set; otherwisefalse
-
containsOneCategory
Returns whether one of the given categories is contained in this set of group categories- Parameters:
categories
- the categories to test containment for- Returns:
true
if one of the given categories is contained in this set; otherwisefalse
-
asList
Converts the group categories into a a unmodifiable list.- Returns:
- an unmodifiable list containing all group categories
-