Class ListUtils


  • public class ListUtils
    extends java.lang.Object
    Emulate List functions missing from GWT port of List
    • Constructor Summary

      Constructors 
      Constructor Description
      ListUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <T> java.util.List<T> copySubList​(java.util.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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ListUtils

        public ListUtils()
    • Method Detail

      • copySubList

        public static <T> java.util.List<T> copySubList​(java.util.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:
        java.lang.IndexOutOfBoundsException - Call exceeds the bounds of the source List
        java.lang.IllegalArgumentException - fromIndex and toIndex are not in sequence