org.rightcollections
Interface MaxCalculator<E>

Type Parameters:
E - type of element
All Known Subinterfaces:
RightCollection<E>, RightList<E>, RightSet<E>
All Known Implementing Classes:
AbstractRightCollection, RightCollectionImpl, RightListImpl, RightSetImpl

public interface MaxCalculator<E>

Something that can calculate maximum value, usually collection.

Author:
Ruslan Pilin

Method Summary
 E max()
          Calculates maximum based on netural order.
 E max(java.util.Comparator<E> comparator)
          Calculates maximum based on comparator.
 

Method Detail

max

E max()
Calculates maximum based on netural order.

Returns:
maximum element

max

E max(java.util.Comparator<E> comparator)
Calculates maximum based on comparator.

Parameters:
comparator - comparator to compare elements
Returns:
maximum element


Copyright © 2009 Ruslan Pilin. All Rights Reserved.