public class LicenseFamilySetFactory extends Object
Constructor and Description |
---|
LicenseFamilySetFactory(SortedSet<ILicenseFamily> licenses,
Collection<String> approvedLicenses)
Constructs a factory with the specified set of Licenses and the approved license collection.
|
Modifier and Type | Method and Description |
---|---|
static SortedSet<ILicenseFamily> |
emptyLicenseFamilySet()
Create an empty sorted Set with proper comparator.
|
static Optional<ILicenseFamily> |
findFamily(String familyId,
SortedSet<ILicenseFamily> licenseFamilies)
Search a SortedSet of ILicenseFamily instances looking for a matching instance.
|
SortedSet<ILicenseFamily> |
getFamilies(LicenseSetFactory.LicenseFilter filter)
Gets the License objects based on the filter.
|
SortedSet<String> |
getFamilyIds(LicenseSetFactory.LicenseFilter filter)
Gets the categories of LicenseFamily objects based on the filter.
|
static boolean |
hasFamily(String familyId,
SortedSet<ILicenseFamily> licenseFamilies)
Search a SortedSet of ILicenseFamily instances looking for a matching instance.
|
static ILicenseFamily |
search(ILicenseFamily target,
SortedSet<ILicenseFamily> licenseFamilies)
Search a SortedSet of ILicenseFamily instances looking for a matching instance.
|
static ILicenseFamily |
search(String target,
SortedSet<ILicenseFamily> licenseFamilies)
Search a SortedSet of ILicenseFamily instances looking for a matching instance.
|
public LicenseFamilySetFactory(SortedSet<ILicenseFamily> licenses, Collection<String> approvedLicenses)
licenses
- the set of defined licenses.approvedLicenses
- the list of approved licenses.public static SortedSet<ILicenseFamily> emptyLicenseFamilySet()
public SortedSet<ILicenseFamily> getFamilies(LicenseSetFactory.LicenseFilter filter)
filter
- the types of LicenseFamily objects to return.public SortedSet<String> getFamilyIds(LicenseSetFactory.LicenseFilter filter)
filter
- the types of LicenseFamily objects to return.public static boolean hasFamily(String familyId, SortedSet<ILicenseFamily> licenseFamilies)
familyId
- The instance to search for.licenseFamilies
- the license families to searchpublic static Optional<ILicenseFamily> findFamily(String familyId, SortedSet<ILicenseFamily> licenseFamilies)
familyId
- The instance to search for.licenseFamilies
- the license families to searchpublic static ILicenseFamily search(String target, SortedSet<ILicenseFamily> licenseFamilies)
target
- The instance to search for.licenseFamilies
- the license families to searchpublic static ILicenseFamily search(ILicenseFamily target, SortedSet<ILicenseFamily> licenseFamilies)
target
- The instance to search for.licenseFamilies
- the license families to searchCopyright © 2006–2024 Apache Software Foundation. All rights reserved.