Package org.openrefine.browsing.columns
Class ColumnStats
- java.lang.Object
-
- org.openrefine.browsing.columns.ColumnStats
-
- All Implemented Interfaces:
Serializable
public class ColumnStats extends Object implements Serializable
A summary of the datatypes and recon statuses of cells within a column.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected long
blanks
protected long
booleans
protected long
dates
protected long
matched
protected long
newElements
protected long
numbers
protected long
reconciled
protected long
strings
static ColumnStats
ZERO
-
Constructor Summary
Constructors Constructor Description ColumnStats(long blanks, long strings, long numbers, long booleans, long dates, long reconciled, long matched, long newElements)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
long
getBlanks()
The number of blank cells in the columnlong
getBooleans()
The number of boolean-valued cells in the column.long
getDates()
The number of date-valued cells in the column.long
getMatched()
The number of cells matched to an existing entity in their recon object.long
getNewElements()
The number of cells matched to a new entity in their recon object.long
getNonBlanks()
The number of non-blank cells in the column.long
getNumbers()
The number of number cell values in the column.long
getReconciled()
The number of cells with a non-null recon object in them.long
getStrings()
The number of non-blank strings in the column.int
hashCode()
ColumnStats
sum(ColumnStats other)
Return the column statistics obtained by summing the statistics in both objects, none of which are modified (being immutable).String
toString()
ColumnStats
withCell(Cell cell)
Returns a copy of this object after updating it with a single cell.
-
-
-
Field Detail
-
blanks
protected final long blanks
-
strings
protected final long strings
-
numbers
protected final long numbers
-
booleans
protected final long booleans
-
dates
protected final long dates
-
reconciled
protected final long reconciled
-
matched
protected final long matched
-
newElements
protected final long newElements
-
ZERO
public static ColumnStats ZERO
-
-
Method Detail
-
getBlanks
public long getBlanks()
The number of blank cells in the column
-
getNonBlanks
public long getNonBlanks()
The number of non-blank cells in the column.
-
getStrings
public long getStrings()
The number of non-blank strings in the column.
-
getNumbers
public long getNumbers()
The number of number cell values in the column.
-
getBooleans
public long getBooleans()
The number of boolean-valued cells in the column.
-
getDates
public long getDates()
The number of date-valued cells in the column.
-
getReconciled
public long getReconciled()
The number of cells with a non-null recon object in them.
-
getMatched
public long getMatched()
The number of cells matched to an existing entity in their recon object.
-
getNewElements
public long getNewElements()
The number of cells matched to a new entity in their recon object.
-
withCell
public ColumnStats withCell(Cell cell)
Returns a copy of this object after updating it with a single cell.- Parameters:
cell
- the cell to extract datatype and reconciliation status from
-
sum
public ColumnStats sum(ColumnStats other)
Return the column statistics obtained by summing the statistics in both objects, none of which are modified (being immutable).
-
-