Package com.fizzed.crux.util
Class Agg
- java.lang.Object
-
- com.fizzed.crux.util.Agg
-
public class Agg extends java.lang.ObjectAggregates (e.g. min/max), with null-safety!- Author:
- jjlauer
-
-
Constructor Summary
Constructors Constructor Description Agg()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <V extends java.lang.Comparable>
Agg.Max<V>max()Helps aggregate the max value according to natural ordering of the type.static <V extends java.lang.Comparable>
Agg.Max<V>max(java.lang.Class<V> type)Helps aggregate the max value according to natural ordering of the type.static <V> Agg.Max<V>max(java.util.Comparator<V> comparator)Helps aggregate the max value.static <V> Agg.Max<V>max(java.util.Comparator<V> comparator, V initialValue)Helps aggregate the max value.static <V extends java.lang.Comparable>
Agg.Max<V>max(V initialValue)Helps aggregate the max value according to the natural ordering of the type of initial value.static <V extends java.lang.Comparable>
Agg.Min<V>min()Helps aggregate the min value according to natural ordering of the type.static <V extends java.lang.Comparable>
Agg.Min<V>min(java.lang.Class<V> type)Helps aggregate the min value according to natural ordering of the type.static <V> Agg.Min<V>min(java.util.Comparator<V> comparator)Helps aggregate the min value.static <V> Agg.Min<V>min(java.util.Comparator<V> comparator, V initialValue)Helps aggregate the min value.static <V extends java.lang.Comparable>
Agg.Min<V>min(V initialValue)Helps aggregate the min value according to the natural ordering of the type of initial value.
-
-
-
Method Detail
-
min
public static <V extends java.lang.Comparable> Agg.Min<V> min()
Helps aggregate the min value according to natural ordering of the type.- Type Parameters:
V-- Returns:
-
min
public static <V extends java.lang.Comparable> Agg.Min<V> min(java.lang.Class<V> type)
Helps aggregate the min value according to natural ordering of the type.- Type Parameters:
V-- Parameters:
type-- Returns:
-
min
public static <V extends java.lang.Comparable> Agg.Min<V> min(V initialValue)
Helps aggregate the min value according to the natural ordering of the type of initial value.- Type Parameters:
V-- Parameters:
initialValue-- Returns:
-
min
public static <V> Agg.Min<V> min(java.util.Comparator<V> comparator)
Helps aggregate the min value. Comparator is the natural ordering of values such that 1 < 2.- Type Parameters:
V-- Parameters:
comparator-- Returns:
-
min
public static <V> Agg.Min<V> min(java.util.Comparator<V> comparator, V initialValue)
Helps aggregate the min value. Comparator is the natural ordering of values such that 1 < 2.- Type Parameters:
V-- Parameters:
comparator-initialValue-- Returns:
-
max
public static <V extends java.lang.Comparable> Agg.Max<V> max()
Helps aggregate the max value according to natural ordering of the type.- Type Parameters:
V-- Returns:
-
max
public static <V extends java.lang.Comparable> Agg.Max<V> max(java.lang.Class<V> type)
Helps aggregate the max value according to natural ordering of the type.- Type Parameters:
V-- Parameters:
type-- Returns:
-
max
public static <V extends java.lang.Comparable> Agg.Max<V> max(V initialValue)
Helps aggregate the max value according to the natural ordering of the type of initial value.- Type Parameters:
V-- Parameters:
initialValue-- Returns:
-
max
public static <V> Agg.Max<V> max(java.util.Comparator<V> comparator)
Helps aggregate the max value. Comparator is the natural ordering of values such that 1 < 2.- Type Parameters:
V-- Parameters:
comparator-- Returns:
-
max
public static <V> Agg.Max<V> max(java.util.Comparator<V> comparator, V initialValue)
Helps aggregate the max value. Comparator is the natural ordering of values such that 1 < 2.- Type Parameters:
V-- Parameters:
comparator-initialValue-- Returns:
-
-