Package com.atlassian.crowd.model
Class DirectoryEntities
java.lang.Object
com.atlassian.crowd.model.DirectoryEntities
Utility class for
DirectoryEntity
.- Since:
- 2.8.1
-
Field Summary
Modifier and TypeFieldDescriptionstatic final Function<DirectoryEntity,
String> A function that projects the lower case namestatic final Function<DirectoryEntity,
String> A function that projects the name -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> List<T>
filterOutDuplicates
(Collection<T> remoteEntities, Function<T, String> nameProvider) static <T extends DirectoryEntity>
List<T>filterOutDuplicates
(List<T> remoteEntities) Remove the duplicate entities from the passed list.namesOf
(Collection<? extends DirectoryEntity> entities) Transforms entities into their names.
-
Field Details
-
NAME_FUNCTION
A function that projects the name -
LOWER_NAME_FUNCTION
A function that projects the lower case name
-
-
Constructor Details
-
DirectoryEntities
public DirectoryEntities()
-
-
Method Details
-
namesOf
Transforms entities into their names.- Parameters:
entities
- some entities- Returns:
- their names
-
filterOutDuplicates
Remove the duplicate entities from the passed list. If an entity occurs more than once (based on case-insensitive name comparison), all occurrences are excluded from the result.- Type Parameters:
T
- the type of entity to filter.- Parameters:
remoteEntities
- the entities to filter.- Returns:
- the list of entities with duplicates removed.
-
filterOutDuplicates
public static <T> List<T> filterOutDuplicates(Collection<T> remoteEntities, Function<T, String> nameProvider)
-