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

Method greater

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

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

(T firstElement, T secondElement)

Source from the content-addressed store, hash-verified

43 * @return true if the first element is greater than the second, false otherwise
44 */
45 public static <T extends Comparable<T>> boolean greater(T firstElement, T secondElement) {
46 return firstElement.compareTo(secondElement) > 0;
47 }
48
49 /**
50 * Compares two elements to see if the first is greater than or equal to the second.

Callers 14

bubbleSortMethod · 0.95
findMaxMethod · 0.95
dutchNationalFlagSortMethod · 0.95
insertionSortMethod · 0.95
heapifyMethod · 0.95
doSortMethod · 0.95
performOddSortMethod · 0.95
performEvenSortMethod · 0.95
partitionMethod · 0.95
findMaxMethod · 0.95
insertionSortMethod · 0.95
bitonicMergeMethod · 0.95

Calls 1

compareToMethod · 0.45

Tested by

no test coverage detected