Class Algorithms

  • public class Algorithms
    extends java.lang.Object
    Algorithms is a class containing static methods that implement general algorithms based on objects returned from a data model.
    • Constructor Summary

      Constructor Description
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static int binarySearchWithDuplicates​(java.util.List data, java.lang.Object searchItem, java.util.Comparator comparator)  
      static <T> void bubbleSort​(java.util.List<T> data, int low, int high, java.util.Comparator<T> comparator)  
      static <T> void mergeSort​(java.util.List<T> data, java.util.Comparator<T> c, TaskMonitor monitor)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Algorithms

        public Algorithms()
    • Method Detail

      • binarySearchWithDuplicates

        public static int binarySearchWithDuplicates​(java.util.List data,
                                                     java.lang.Object searchItem,
                                                     java.util.Comparator comparator)
      • bubbleSort

        public static <T> void bubbleSort​(java.util.List<T> data,
                                          int low,
                                          int high,
                                          java.util.Comparator<T> comparator)
      • mergeSort

        public static <T> void mergeSort​(java.util.List<T> data,
                                         java.util.Comparator<T> c,
                                         TaskMonitor monitor)