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 longblanksprotected longbooleansprotected longdatesprotected longmatchedprotected longnewElementsprotected longnumbersprotected longreconciledprotected longstringsstatic ColumnStatsZERO
-
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 booleanequals(Object o)longgetBlanks()The number of blank cells in the columnlonggetBooleans()The number of boolean-valued cells in the column.longgetDates()The number of date-valued cells in the column.longgetMatched()The number of cells matched to an existing entity in their recon object.longgetNewElements()The number of cells matched to a new entity in their recon object.longgetNonBlanks()The number of non-blank cells in the column.longgetNumbers()The number of number cell values in the column.longgetReconciled()The number of cells with a non-null recon object in them.longgetStrings()The number of non-blank strings in the column.inthashCode()ColumnStatssum(ColumnStats other)Return the column statistics obtained by summing the statistics in both objects, none of which are modified (being immutable).StringtoString()ColumnStatswithCell(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).
-
-