Class SmartIterator<A>

java.lang.Object
org.opencastproject.util.SmartIterator<A>

public class SmartIterator<A> extends Object
Utility class for applying limit and offset to a map or collection
  • Constructor Details

    • SmartIterator

      public SmartIterator(int limit, int offset)
  • Method Details

    • applyLimitAndOffset

      public Map<String,A> applyLimitAndOffset(Map<String,A> map)
      Apply limit and offset to a map of value type SmartIterator
      Parameters:
      map - the map
      Returns:
      the filtered map
    • applyLimitAndOffset

      public List<A> applyLimitAndOffset(Collection<A> unfilteredCollection)
      Apply limit and offset to a collection of type SmartIterator
      Parameters:
      unfilteredCollection - the collection
      Returns:
      the filtered list