Package org.apache.beam.sdk.transforms
Class ApproximateUnique.ApproximateUniqueCombineFn.LargestUnique
- java.lang.Object
-
- org.apache.beam.sdk.transforms.ApproximateUnique.ApproximateUniqueCombineFn.LargestUnique
-
- All Implemented Interfaces:
java.io.Serializable
- Enclosing class:
- ApproximateUnique.ApproximateUniqueCombineFn<T>
public static class ApproximateUnique.ApproximateUniqueCombineFn.LargestUnique extends java.lang.Object implements java.io.Serializable
A heap utility class to efficiently track the largest added elements.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description LargestUnique(long sampleSize)
Creates a heap to track the largestsampleSize
elements.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
add(long value)
Adds a value to the heap, returning whether the value is (large enough to be) in the heap.boolean
equals(@Nullable java.lang.Object o)
int
hashCode()
-
-
-
Method Detail
-
add
public boolean add(long value)
Adds a value to the heap, returning whether the value is (large enough to be) in the heap.
-
equals
public boolean equals(@Nullable java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-