Class DirectoryEntities

java.lang.Object
com.atlassian.crowd.model.DirectoryEntities

public class DirectoryEntities extends Object
Utility class for DirectoryEntity.
Since:
2.8.1
  • Field Details

  • Constructor Details

    • DirectoryEntities

      public DirectoryEntities()
  • Method Details

    • namesOf

      public static List<String> namesOf(Collection<? extends DirectoryEntity> entities)
      Transforms entities into their names.
      Parameters:
      entities - some entities
      Returns:
      their names
    • filterOutDuplicates

      public static <T extends DirectoryEntity> List<T> filterOutDuplicates(List<T> remoteEntities)
      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)