Klasse Sort
java.lang.Object
de.uplanet.lucy.server.auxiliaries.collections.Sort
-
Verschachtelte Klassen - Übersicht
Verschachtelte KlassenModifizierer und TypKlasseBeschreibungstatic final classComparators forjava.lang.Strings. -
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungComparator<?> createComparator(String p_strClass) Create a comparator for sorting, e.g.Get comparators for strings.<T extends Object & Comparable<? super T>>
Tmax(Collection<? extends T> p_collection) Returns the minimum element of the given collection, according to the natural ordering of its elements.<T> Tmax(Collection<? extends T> p_collection, Comparator<? super T> p_comparator) Returns the minimum element of the given collection, according to the order induced by the specified comparator.<T extends Object & Comparable<? super T>>
Tmin(Collection<? extends T> p_collection) Returns the minimum element of the given collection, according to the natural ordering of its elements.<T> Tmin(Collection<? extends T> p_collection, Comparator<? super T> p_comparator) Returns the minimum element of the given collection, according to the order induced by the specified comparator.List<?> <T extends Comparable<T>>
List<T> Sorts the specified list into ascending order, according to the natural ordering of its elements.<T> List<T> sort(List<T> p_list, Comparator<? super T> p_comparator) Sorts the specified list according to the order induced by the specified comparator.<K extends Comparable<K>,V>
Map<K, V> Try to sort the given map according to the natural ordering of its keys.<K extends Comparable<K>,V>
Map<K, V> sort(Map<K, V> p_map, Comparator<? super K> p_comparator) Try to sort the given map according to the natural ordering of its keys.
-
Konstruktordetails
-
Sort
public Sort()
-
-
Methodendetails
-
getString
Get comparators for strings.- Gibt zurück:
- The comparators.
-
sort
Sorts the specified list into ascending order, according to the natural ordering of its elements.- Parameter:
p_list- List of objects that should be sorted.- Gibt zurück:
- The sorted list (same object as
p_list).
-
sort
Sorts the specified list according to the order induced by the specified comparator.- Parameter:
p_list- List of objects that should be sorted.p_comparator- The comparator to be used.- Gibt zurück:
- The sorted list (same object as
p_list).
-
reverse
- Parameter:
p_list- List of objects that should be reverted.- Gibt zurück:
- The reverted list (same object as
p_list).
-
min
Returns the minimum element of the given collection, according to the natural ordering of its elements.- Parameter:
p_collection- The collection.- Gibt zurück:
- The minimum element.
-
min
Returns the minimum element of the given collection, according to the order induced by the specified comparator.- Parameter:
p_collection- The collection.p_comparator- The comparator.- Gibt zurück:
- The minimum element.
-
max
Returns the minimum element of the given collection, according to the natural ordering of its elements.- Parameter:
p_collection- The collection.- Gibt zurück:
- The minimum element.
-
max
Returns the minimum element of the given collection, according to the order induced by the specified comparator.- Parameter:
p_collection- The collection.p_comparator- The comparator.- Gibt zurück:
- The minimum element.
-
sort
Try to sort the given map according to the natural ordering of its keys. If sorting fails, e.g. due to incomparable keys, the given map is returned.- Parameter:
p_map- The map that should be sorted.- Gibt zurück:
- The sorted map, or the original map if sorting was
not possible. If the given map is
null, thennullwill be returned.
-
sort
public <K extends Comparable<K>,V> Map<K,V> sort(Map<K, V> p_map, Comparator<? super K> p_comparator) Try to sort the given map according to the natural ordering of its keys. If sorting fails, e.g. due to incomparable keys, the given map is returned.- Parameter:
p_map- The map that should be sorted.p_comparator- The comparator to be used.- Gibt zurück:
- The sorted map, or the original map if sorting was
not possible. If the given map is
null, thennullwill be returned.
-
createComparator
Create a comparator for sorting, e.g.DsSetNameComparatorDsUserItemDisplayNameComparatorDsUserItemFirstNameLastNameComparatorDsUserItemFullNameComparatorDsUserLastNameFirstNameComparatorDsUserLoginNameComparatorUserDisplayNameComparatorUserFirstNameLastNameComparatorUserFullNameComparatorUserLastNameFirstNameComparatorUserLoginNameComparator
- Parameter:
p_strClass- The name of the comparator class, e.g. one of- Gibt zurück:
- The requested comparator, or
nullif an error occurred.
-