Class FrequentLongsSketch.Row
java.lang.Object
org.apache.datasketches.frequencies.FrequentLongsSketch.Row
- All Implemented Interfaces:
Comparable<FrequentLongsSketch.Row>
- Enclosing class:
FrequentLongsSketch
public static class FrequentLongsSketch.Row
extends Object
implements Comparable<FrequentLongsSketch.Row>
Row class that defines the return values from a getFrequentItems query.
- Author:
- Justin Thaler, Lee Rhodes
-
Method Summary
Modifier and TypeMethodDescriptionintThis compareTo is strictly limited to the Row.getEstimate() value and does not imply any ordering whatsoever to the other elements of the row: item and upper and lower bounds.booleanThis equals is computed only from the Row.getEstimate() value and does not imply equality of the other items within the row: item and upper and lower bounds.longReturns the estimatelonggetItem()Returns item of type longlongReturns the lower boundstatic StringReturns the descriptive row headerlongReturns the upper boundinthashCode()This hashCode is computed only from the Row.getEstimate() value.toString()
-
Method Details
-
getItem
public long getItem()Returns item of type long- Returns:
- item of type long
-
getEstimate
public long getEstimate()Returns the estimate- Returns:
- the estimate
-
getUpperBound
public long getUpperBound()Returns the upper bound- Returns:
- the upper bound
-
getLowerBound
public long getLowerBound()Returns the lower bound- Returns:
- return the lower bound
-
getRowHeader
Returns the descriptive row header- Returns:
- the descriptive row header
-
toString
-
compareTo
This compareTo is strictly limited to the Row.getEstimate() value and does not imply any ordering whatsoever to the other elements of the row: item and upper and lower bounds. Defined this way, this compareTo will be consistent with hashCode() and equals(Object).- Specified by:
compareToin interfaceComparable<FrequentLongsSketch.Row>- Parameters:
that- the other row to compare to.- Returns:
- a negative integer, zero, or a positive integer as this.getEstimate() is less than, equal to, or greater than that.getEstimate().
-
hashCode
public int hashCode()This hashCode is computed only from the Row.getEstimate() value. Defined this way, this hashCode will be consistent with equals(Object):
If (x.equals(y)) implies: x.hashCode() == y.hashCode().
If (!x.equals(y)) does NOT imply: x.hashCode() != y.hashCode(). -
equals
This equals is computed only from the Row.getEstimate() value and does not imply equality of the other items within the row: item and upper and lower bounds. Defined this way, this equals will be consistent with compareTo(Row).
-