Class ListProviderUtil

java.lang.Object
org.opencastproject.list.util.ListProviderUtil

public final class ListProviderUtil extends Object
  • Method Details

    • sortMapByValue

      public static Map<String,String> sortMapByValue(Map<String,String> map, boolean asc)
      Sorts the given map by its values, ascendantly or not
      Parameters:
      map - The map to sort
      asc - If the sorting should be done ascendantly (true) or not
      Returns:
      a sorted map
    • filterMap

      public static Map<String,String> filterMap(Map<String,String> map, ResourceListQuery query)
      Filtered a simple map with the given query using the limit and offset parameters
      Parameters:
      map - The map to filter
      query - The query
      Returns:
      the filtered map
    • invertMap

      public static Map<String,String> invertMap(Map<String,String> map)
      Invert the key & value in the given map
      Parameters:
      map - the map to invert
      Returns:
      an inverted map