MCPcopy Create free account
hub / github.com/TheAlgorithms/Java / less

Method less

src/main/java/com/thealgorithms/sorts/SortUtils.java:34–36  ·  view source on GitHub ↗

Compares two elements to see if the first is less than the second. @param firstElement the first element to compare @param secondElement the second element to compare @return true if the first element is less than the second, false otherwise

(T firstElement, T secondElement)

Source from the content-addressed store, hash-verified

32 * @return true if the first element is less than the second, false otherwise
33 */
34 public static <T extends Comparable<T>> boolean less(T firstElement, T secondElement) {
35 return firstElement.compareTo(secondElement) < 0;
36 }
37
38 /**
39 * Compares two elements to see if the first is greater than the second.

Callers 15

sortMethod · 0.95
findMinMethod · 0.95
sortMethod · 0.95
mergeMethod · 0.95
findIndexOfMinMethod · 0.95
dutchNationalFlagSortMethod · 0.95
sortMethod · 0.95
isWaveSortedMethod · 0.95
siftMethod · 0.95
trinkleMethod · 0.95

Calls 1

compareToMethod · 0.45

Tested by

no test coverage detected