Below given are some methods provided by Guava’s Ordering Class :Ordering() : This is a constructor of Ordering Class of Guava. It constructs a new instance of this class (only invokable by the subclass constructor, typically implicit). Some other methods provided by this Class are :Exceptions :

explicit(List valuesInOrder) : NullPointerException if any of the provided values is null, IllegalArgumentException if valuesInOrder contains any duplicate values.

explicit(T leastValue, T… remainingValuesInOrder) : NullPointerException if any of the provided values is null, IllegalArgumentException if any duplicate values.

min(Iterator iterator) : NoSuchElementException if iterator is empty, ClassCastException if the parameters are not mutually comparable under this ordering.

min(Iterable iterable) : NoSuchElementException if iterable is empty, ClassCastException if the parameters are not mutually comparable under this ordering.

min(E a, E b) : ClassCastException if the parameters are not mutually comparable under this ordering.

min(E a, E b, E c, E… rest) : ClassCastException if the parameters are not mutually comparable under this ordering.

max(Iterator iterator) : NoSuchElementException if iterator is empty, ClassCastException if the parameters are not mutually comparable under this ordering.

max(Iterable iterable) : NoSuchElementException if iterable is empty, ClassCastException if the parameters are not mutually comparable under this ordering.

max(E a, E b) : ClassCastException if the parameters are not mutually comparable under this ordering.

max(E a, E b, E c, E… rest) : ClassCastException if the parameters are not mutually comparable under this ordering.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.