Class ListUtils

java.lang.Object
org.restlet.engine.util.ListUtils

public class ListUtils extends Object
Emulate List functions missing from GWT port of List
Author:
Rob Heittman
  • Constructor Details

    • ListUtils

      public ListUtils()
  • Method Details

    • copySubList

      public static <T> List<T> copySubList(List<T> list, int fromIndex, int toIndex)
      Unlike List.subList(), which returns a live view of a set of List elements, this method returns a new copy of the list. List.subList() is not available in GWT 1.5 and was removed on purpose.
      Parameters:
      list - The source List
      fromIndex - Starting index in the source List
      toIndex - Ending index in the source List
      Returns:
      a copy of the selected range
      Throws:
      IndexOutOfBoundsException - Call exceeds the bounds of the source List
      IllegalArgumentException - fromIndex and toIndex are not in sequence