public class Max
extends java.lang.Object
PTransforms for computing the maximum of the elements in a PCollection, or the
 maximum of the values associated with each key in a PCollection of KVs.
 Example 1: get the maximum of a PCollection of Doubles.
 
 PCollection<Double> input = ...;
 PCollection<Double> max = input.apply(Max.doublesGlobally());
 Example 2: calculate the maximum of the Integers associated with each unique key
 (which is of type String).
 
 PCollection<KV<String, Integer>> input = ...;
 PCollection<KV<String, Integer>> maxPerKey = input
     .apply(Max.<String>integersPerKey());
 | Modifier and Type | Method and Description | 
|---|---|
| static Combine.Globally<java.lang.Double,java.lang.Double> | doublesGlobally()Returns a  PTransformthat takes an inputPCollection<Double>and returns aPCollection<Double>whose contents is the maximum of the inputPCollection's
 elements, orDouble.NEGATIVE_INFINITYif there are no elements. | 
| static <K> Combine.PerKey<K,java.lang.Double,java.lang.Double> | doublesPerKey()Returns a  PTransformthat takes an inputPCollection<KV<K, Double>>and returns
 aPCollection<KV<K, Double>>that contains an output element mapping each distinct key
 in the inputPCollectionto the maximum of the values associated with that key in the
 inputPCollection. | 
| static <T extends java.lang.Comparable<? super T>> | globally()Returns a  PTransformthat takes an inputPCollection<T>and returns aPCollection<T>whose contents is the maximum according to the natural ordering ofTof
 the inputPCollection's elements, ornullif there are no elements. | 
| static <T,ComparatorT extends java.util.Comparator<? super T> & java.io.Serializable> | globally(ComparatorT comparator)Returns a  PTransformthat takes an inputPCollection<T>and returns aPCollection<T>whose contents is the maximum of the inputPCollection's elements, ornullif there are no elements. | 
| static Combine.Globally<java.lang.Integer,java.lang.Integer> | integersGlobally()Returns a  PTransformthat takes an inputPCollection<Integer>and returns aPCollection<Integer>whose contents is the maximum of the inputPCollection's
 elements, orInteger.MIN_VALUEif there are no elements. | 
| static <K> Combine.PerKey<K,java.lang.Integer,java.lang.Integer> | integersPerKey()Returns a  PTransformthat takes an inputPCollection<KV<K, Integer>>and
 returns aPCollection<KV<K, Integer>>that contains an output element mapping each
 distinct key in the inputPCollectionto the maximum of the values associated with that
 key in the inputPCollection. | 
| static Combine.Globally<java.lang.Long,java.lang.Long> | longsGlobally()Returns a  PTransformthat takes an inputPCollection<Long>and returns aPCollection<Long>whose contents is the maximum of the inputPCollection's elements,
 orLong.MIN_VALUEif there are no elements. | 
| static <K> Combine.PerKey<K,java.lang.Long,java.lang.Long> | longsPerKey()Returns a  PTransformthat takes an inputPCollection<KV<K, Long>>and returns aPCollection<KV<K, Long>>that contains an output element mapping each distinct key in
 the inputPCollectionto the maximum of the values associated with that key in the
 inputPCollection. | 
| static <T extends java.lang.Comparable<? super T>> | naturalOrder() | 
| static <T extends java.lang.Comparable<? super T>> | naturalOrder(T identity) | 
| static <T,ComparatorT extends java.util.Comparator<? super T> & java.io.Serializable> | of(ComparatorT comparator)A  CombineFnthat computes the maximum of a collection of elements of typeTusing an arbitraryComparator, useful as an argument toCombine.globally(org.apache.beam.sdk.transforms.SerializableFunction<java.lang.Iterable<V>, V>)orCombine.perKey(org.apache.beam.sdk.transforms.SerializableFunction<java.lang.Iterable<V>, V>). | 
| static <T,ComparatorT extends java.util.Comparator<? super T> & java.io.Serializable> | of(T identity,
  ComparatorT comparator)A  CombineFnthat computes the maximum of a collection of elements of typeTusing an arbitraryComparatorandidentity, useful as an argument toCombine.globally(org.apache.beam.sdk.transforms.SerializableFunction<java.lang.Iterable<V>, V>)orCombine.perKey(org.apache.beam.sdk.transforms.SerializableFunction<java.lang.Iterable<V>, V>). | 
| static Combine.BinaryCombineDoubleFn | ofDoubles()A  CombineFnthat computes the maximum of a collection ofDoubles, useful as an
 argument toCombine.globally(org.apache.beam.sdk.transforms.SerializableFunction<java.lang.Iterable<V>, V>)orCombine.perKey(org.apache.beam.sdk.transforms.SerializableFunction<java.lang.Iterable<V>, V>). | 
| static Combine.BinaryCombineIntegerFn | ofIntegers()A  CombineFnthat computes the maximum of a collection ofIntegers, useful as an
 argument toCombine.globally(org.apache.beam.sdk.transforms.SerializableFunction<java.lang.Iterable<V>, V>)orCombine.perKey(org.apache.beam.sdk.transforms.SerializableFunction<java.lang.Iterable<V>, V>). | 
| static Combine.BinaryCombineLongFn | ofLongs()A  CombineFnthat computes the maximum of a collection ofLongs, useful as an
 argument toCombine.globally(org.apache.beam.sdk.transforms.SerializableFunction<java.lang.Iterable<V>, V>)orCombine.perKey(org.apache.beam.sdk.transforms.SerializableFunction<java.lang.Iterable<V>, V>). | 
| static <K,T extends java.lang.Comparable<? super T>> | perKey()Returns a  PTransformthat takes an inputPCollection<KV<K, T>>and returns aPCollection<KV<K, T>>that contains an output element mapping each distinct key in the
 inputPCollectionto the maximum according to the natural ordering ofTof the
 values associated with that key in the inputPCollection. | 
| static <K,T,ComparatorT extends java.util.Comparator<? super T> & java.io.Serializable> | perKey(ComparatorT comparator)Returns a  PTransformthat takes an inputPCollection<KV<K, T>>and returns aPCollection<KV<K, T>>that contains one output element per key mapping each to the
 maximum of the values associated with that key in the inputPCollection. | 
public static Combine.Globally<java.lang.Integer,java.lang.Integer> integersGlobally()
PTransform that takes an input PCollection<Integer> and returns a
 PCollection<Integer> whose contents is the maximum of the input PCollection's
 elements, or Integer.MIN_VALUE if there are no elements.public static <K> Combine.PerKey<K,java.lang.Integer,java.lang.Integer> integersPerKey()
PTransform that takes an input PCollection<KV<K, Integer>> and
 returns a PCollection<KV<K, Integer>> that contains an output element mapping each
 distinct key in the input PCollection to the maximum of the values associated with that
 key in the input PCollection.
 See Combine.PerKey for how this affects timestamps and windowing.
public static Combine.Globally<java.lang.Long,java.lang.Long> longsGlobally()
PTransform that takes an input PCollection<Long> and returns a PCollection<Long> whose contents is the maximum of the input PCollection's elements,
 or Long.MIN_VALUE if there are no elements.public static <K> Combine.PerKey<K,java.lang.Long,java.lang.Long> longsPerKey()
PTransform that takes an input PCollection<KV<K, Long>> and returns a
 PCollection<KV<K, Long>> that contains an output element mapping each distinct key in
 the input PCollection to the maximum of the values associated with that key in the
 input PCollection.
 See Combine.PerKey for how this affects timestamps and windowing.
public static Combine.Globally<java.lang.Double,java.lang.Double> doublesGlobally()
PTransform that takes an input PCollection<Double> and returns a
 PCollection<Double> whose contents is the maximum of the input PCollection's
 elements, or Double.NEGATIVE_INFINITY if there are no elements.public static <K> Combine.PerKey<K,java.lang.Double,java.lang.Double> doublesPerKey()
PTransform that takes an input PCollection<KV<K, Double>> and returns
 a PCollection<KV<K, Double>> that contains an output element mapping each distinct key
 in the input PCollection to the maximum of the values associated with that key in the
 input PCollection.
 See Combine.PerKey for how this affects timestamps and windowing.
public static Combine.BinaryCombineIntegerFn ofIntegers()
CombineFn that computes the maximum of a collection of Integers, useful as an
 argument to Combine.globally(org.apache.beam.sdk.transforms.SerializableFunction<java.lang.Iterable<V>, V>) or Combine.perKey(org.apache.beam.sdk.transforms.SerializableFunction<java.lang.Iterable<V>, V>).public static Combine.BinaryCombineLongFn ofLongs()
CombineFn that computes the maximum of a collection of Longs, useful as an
 argument to Combine.globally(org.apache.beam.sdk.transforms.SerializableFunction<java.lang.Iterable<V>, V>) or Combine.perKey(org.apache.beam.sdk.transforms.SerializableFunction<java.lang.Iterable<V>, V>).public static Combine.BinaryCombineDoubleFn ofDoubles()
CombineFn that computes the maximum of a collection of Doubles, useful as an
 argument to Combine.globally(org.apache.beam.sdk.transforms.SerializableFunction<java.lang.Iterable<V>, V>) or Combine.perKey(org.apache.beam.sdk.transforms.SerializableFunction<java.lang.Iterable<V>, V>).public static <T,ComparatorT extends java.util.Comparator<? super T> & java.io.Serializable> Combine.BinaryCombineFn<T> of(T identity, ComparatorT comparator)
CombineFn that computes the maximum of a collection of elements of type T
 using an arbitrary Comparator and identity, useful as an argument to Combine.globally(org.apache.beam.sdk.transforms.SerializableFunction<java.lang.Iterable<V>, V>) or Combine.perKey(org.apache.beam.sdk.transforms.SerializableFunction<java.lang.Iterable<V>, V>).T - the type of the values being comparedpublic static <T,ComparatorT extends java.util.Comparator<? super T> & java.io.Serializable> Combine.BinaryCombineFn<T> of(ComparatorT comparator)
CombineFn that computes the maximum of a collection of elements of type T
 using an arbitrary Comparator, useful as an argument to Combine.globally(org.apache.beam.sdk.transforms.SerializableFunction<java.lang.Iterable<V>, V>) or
 Combine.perKey(org.apache.beam.sdk.transforms.SerializableFunction<java.lang.Iterable<V>, V>).T - the type of the values being comparedpublic static <T extends java.lang.Comparable<? super T>> Combine.BinaryCombineFn<T> naturalOrder(T identity)
public static <T extends java.lang.Comparable<? super T>> Combine.BinaryCombineFn<T> naturalOrder()
public static <T extends java.lang.Comparable<? super T>> Combine.Globally<T,T> globally()
PTransform that takes an input PCollection<T> and returns a PCollection<T> whose contents is the maximum according to the natural ordering of T of
 the input PCollection's elements, or null if there are no elements.public static <K,T extends java.lang.Comparable<? super T>> Combine.PerKey<K,T,T> perKey()
PTransform that takes an input PCollection<KV<K, T>> and returns a
 PCollection<KV<K, T>> that contains an output element mapping each distinct key in the
 input PCollection to the maximum according to the natural ordering of T of the
 values associated with that key in the input PCollection.
 See Combine.PerKey for how this affects timestamps and windowing.
public static <T,ComparatorT extends java.util.Comparator<? super T> & java.io.Serializable> Combine.Globally<T,T> globally(ComparatorT comparator)
PTransform that takes an input PCollection<T> and returns a PCollection<T> whose contents is the maximum of the input PCollection's elements, or
 null if there are no elements.public static <K,T,ComparatorT extends java.util.Comparator<? super T> & java.io.Serializable> Combine.PerKey<K,T,T> perKey(ComparatorT comparator)
PTransform that takes an input PCollection<KV<K, T>> and returns a
 PCollection<KV<K, T>> that contains one output element per key mapping each to the
 maximum of the values associated with that key in the input PCollection.
 See Combine.PerKey for how this affects timestamps and windowing.