org.thymeleaf.util
Class ListUtils

Object
  extended by org.thymeleaf.util.ListUtils

public final class ListUtils
extends Object

Since:
1.0
Author:
Daniel Fernández

Method Summary
static boolean contains(List<?> target, Object element)
           
static boolean containsAll(List<?> target, Collection<?> elements)
           
static boolean containsAll(List<?> target, Object[] elements)
           
static boolean isEmpty(List<?> target)
           
static int size(List<?> target)
           
static
<T extends Comparable<? super T>>
List<T>
sort(List<T> list)
           Creates an new instance of the list add the sorted list to it.
static
<T> List<T>
sort(List<T> list, Comparator<? super T> c)
           Creates an new instance of the list add the sorted list to it.
static List<?> toList(Object target)
           
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

toList

public static List<?> toList(Object target)

size

public static int size(List<?> target)

isEmpty

public static boolean isEmpty(List<?> target)

contains

public static boolean contains(List<?> target,
                               Object element)

containsAll

public static boolean containsAll(List<?> target,
                                  Object[] elements)

containsAll

public static boolean containsAll(List<?> target,
                                  Collection<?> elements)

sort

public static <T extends Comparable<? super T>> List<T> sort(List<T> list)

Creates an new instance of the list add the sorted list to it.

Parameters:
list - the list which content should be ordered.
Returns:
a new sorted list.
See Also:
Collections.sort(List).

sort

public static <T> List<T> sort(List<T> list,
                               Comparator<? super T> c)

Creates an new instance of the list add the sorted list to it.

Parameters:
list - the list which content should be ordered.
c - the comparator.
Returns:
a new sorted list.
See Also:
Collections.sort(List, Comparator).


Copyright © 2013 The THYMELEAF team. All Rights Reserved.