Package org.basex.index.stats
Class Stats
java.lang.Object
org.basex.index.stats.Stats
This class provides statistical data for an indexed node.
- Author:
- BaseX Team 2005-21, BSD License, Christian Gruen
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
values
Distinct values (value, number of occurrence). -
min
public double minMinimum value. -
max
public double maxMaximum value. -
count
public int countNumber of occurrences. -
type
public byte typeData type.
-
-
Constructor Details
-
Stats
public Stats()Default constructor. -
Stats
Constructor, specifying an input stream.- Parameters:
in- input stream- Throws:
IOException- I/O exception
-
-
Method Details
-
write
Writes the key statistics to the specified output stream.- Parameters:
out- output stream- Throws:
IOException- I/O exception
-
add
Adds a value. All values are first treated as integer values. If a value cannot be converted to an integer, it is treated as double value. If conversion fails again, it is handled as string category. Next, all values are cached. As soon as their number exceeds a maximum, the cached values are skipped, and contents are treated as arbitrary strings.- Parameters:
value- value to be addedmeta- meta data
-
isLeaf
public boolean isLeaf()Getter for leaf flag.- Returns:
- leaf flag
-
setLeaf
public void setLeaf(boolean l) Setter for leaf flag.- Parameters:
l- leaf or not
-
toString
-