de.uplanet.lucy.server.auxiliaries.collections
Class Sort

java.lang.Object
  extended by de.uplanet.lucy.server.auxiliaries.collections.Sort

@VelocityCallable(value="singleton")
public final class Sort
extends java.lang.Object

Version:
$Revision: 69122 $

Constructor Summary
Sort()
           
 
Method Summary
 java.util.Comparator<?> createComparator(java.lang.String p_strClass)
           
<T extends java.lang.Comparable<T>>
java.util.List<T>
reverse(java.util.List<T> p_list)
           
<T extends java.lang.Comparable<T>>
java.util.List<T>
sort(java.util.List<T> p_list)
           
<T> java.util.List<T>
sort(java.util.List<T> p_list, java.util.Comparator<? super T> p_comparator)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Sort

public Sort()
Method Detail

sort

public <T extends java.lang.Comparable<T>> java.util.List<T> sort(java.util.List<T> p_list)
Parameters:
p_list - List of objects that should be sorted.
Returns:
The sorted list (same object as p_list).

sort

public <T> java.util.List<T> sort(java.util.List<T> p_list,
                                  java.util.Comparator<? super T> p_comparator)
Parameters:
p_list - List of objects that should be sorted.
p_comparator - The comparator to be used.
Returns:
The sorted list (same object as p_list).

reverse

public <T extends java.lang.Comparable<T>> java.util.List<T> reverse(java.util.List<T> p_list)
Parameters:
p_list - List of objects that should be reverted.
Returns:
The reverted list (same object as p_list).

createComparator

public java.util.Comparator<?> createComparator(java.lang.String p_strClass)
Parameters:
p_strClass - The name of the comparator class.
Returns:
The requested comparator, or null if an error occurred.


Last updated: 2011-01-27
Copyright 2000-2010 United Planet. All Rights Reserved.