| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static int[] | Returns: the clone of the given arraythe array to clone array)Return a clone of the given int array. |
| public static boolean | Returns: the result of the comparisonthe first int array left, int[] the second int array right)Compare two int arrays. |
| public static void | |
| private static int | Returns: the new index of the pivot element inside the arraythe int array whose subarray will be splitted source, int the start position of the subarray left, int the end position of the subarray right, int the index of the pivot element inside the array pivotIndex)Split a subarray of a source array into two partitions. |
| public static void | quicksort(int[]
the array of integers that needs to be sorted. source)Sorts this array of integers according to the Quicksort algorithm. |
| public static void | quicksort(int[]
the int array to be sorted source, int the start index of the subarray left, int the end index of the subarray right)Sort a subarray of a source array. |
| public static int[] | Returns: a subarray of input, ranging from start to end-
the input int array input, final int -
the start index start, final int -
the end index end)Generates a subarray of a given int array. |
| public static String | |
| public static String |
| IntUtils | back to summary |
|---|---|
| private IntUtils() Default constructor (private). | |
| clone | back to summary |
|---|---|
| public static int[] clone(int[] array) Return a clone of the given int array. No null checks are performed.
| |
| equals | back to summary |
|---|---|
| public static boolean equals(int[] left, int[] right) Compare two int arrays. No null checks are performed.
| |
| fill | back to summary |
|---|---|
| public static void fill(int[] array, int value) Fill the given int array with the given value.
| |
| partition | back to summary |
|---|---|
| private static int partition(int[] source, int left, int right, int pivotIndex) Split a subarray of a source array into two partitions. The left partition contains elements that have value less than or equal to the pivot element, the right partition contains the elements that have larger value.
| |
| quicksort | back to summary |
|---|---|
| public static void quicksort(int[] source) Sorts this array of integers according to the Quicksort algorithm. After calling this method this array is sorted in ascending order with the smallest integer taking position 0 in the array.
This implementation is based on the quicksort algorithm as described in
| |
| quicksort | back to summary |
|---|---|
| public static void quicksort(int[] source, int left, int right) Sort a subarray of a source array. The subarray is specified by its start and end index.
| |
| subArray | back to summary |
|---|---|
| public static int[] subArray(final int[] input, final int start, final int end) Generates a subarray of a given int array.
| |
| toHexString | back to summary |
|---|---|
public static String toHexString(int[] input)
| |
| toString | back to summary |
|---|---|
public static String toString(int[] input)
| |