public class SortUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static <T> void |
asc(T comparableArray)
Orders given comparable array by ascending.
|
static <T extends Comparable<? super T>> |
asc(T[] comparableArray)
Return a new ordered array has all element of given comparable array by
ascending.
|
static <T> T |
ascClone(T comparableArray)
Return a new ordered array has all element of given comparable array by
ascending.
|
static <T extends Comparable<? super T>> |
ascDeep(T[] comparableArray)
Orders given comparable array by ascending.
|
static <T> void |
desc(T comparableArray)
Orders given comparable array by descending.
|
static <T extends Comparable<? super T>> |
desc(T[] comparableArray)
Return a new ordered array has all element of given comparable array by
descending.
|
static <T> T |
descClone(T comparableArray)
Return a new ordered array has all element of given comparable array by
descending.
|
static <T extends Comparable<? super T>> |
descDeep(T[] comparableArray)
Orders given comparable array by descending.
|
static <T extends Comparable<? super T>> |
greaterThan(T object,
T other)
Returns true if object greater than other; false otherwise.
|
static <T extends Comparable<? super T>> |
greaterThanOrEquals(T object,
T other)
Returns true if object equals other or object greater than other; false
otherwise.
|
static <T extends Comparable<? super T>> |
lessThan(T object,
T other)
Returns true if object less than other; false otherwise.
|
static <T extends Comparable<? super T>> |
lessThanOrEquals(T object,
T other)
Returns true if object equals other or object less than other; false
otherwise.
|
static <T> void |
reverse(T array)
Sort the array in reverse order.
|
public static <T extends Comparable<? super T>> boolean greaterThanOrEquals(T object, T other)
object - comparable object to test.other - comparable object to test.public static <T extends Comparable<? super T>> boolean greaterThan(T object, T other)
object - comparable object to test.other - comparable object to test.public static <T extends Comparable<? super T>> boolean lessThanOrEquals(T object, T other)
object - comparable object to test.other - comparable object to test.public static <T extends Comparable<? super T>> boolean lessThan(T object, T other)
object - comparable object to test.other - comparable object to test.public static <T extends Comparable<? super T>> T[] asc(T[] comparableArray)
comparableArray - comparable array to be handed.public static <T extends Comparable<? super T>> void ascDeep(T[] comparableArray)
comparableArray - comparable array to be handed.public static <T extends Comparable<? super T>> T[] desc(T[] comparableArray)
comparableArray - comparable array to be handed.public static <T extends Comparable<? super T>> void descDeep(T[] comparableArray)
comparableArray - comparable array to be handed.public static <T> T ascClone(T comparableArray)
comparableArray - comparable array to be handed.public static <T> void asc(T comparableArray)
comparableArray - comparable array to be handed.public static <T> T descClone(T comparableArray)
comparableArray - comparable array to be handed.public static <T> void desc(T comparableArray)
comparableArray - comparable array to be handed.public static <T> void reverse(T array)
array - object to be handled.Copyright © 2014. All rights reserved.