public class PivotFacetFieldValueCollection extends Object implements Iterable<PivotFacetValue>
PivotFacetValue
s associated with a
PivotFacetField
withs pecial tracking of a PivotFacetValue
corrisponding to the null
value when FacetParams.FACET_MISSING
is used.markDirty()
,
PivotFacetField
,
PivotFacetValue
Modifier and Type | Class and Description |
---|---|
class |
PivotFacetFieldValueCollection.PivotFacetCountComparator
Sorts
PivotFacetValue instances by their count |
class |
PivotFacetFieldValueCollection.PivotFacetValueComparator
Sorts
PivotFacetValue instances by their value |
Constructor and Description |
---|
PivotFacetFieldValueCollection(int minCount,
int offset,
int limit,
String fieldSort) |
Modifier and Type | Method and Description |
---|---|
void |
add(PivotFacetValue pfValue)
Adds a
PivotFacetValue to this collection -- callers must not use this
method if a PivotFacetValue with the same value already exists in this collection |
PivotFacetValue |
get(Comparable value)
Fast lookup to retrieve a
PivotFacetValue from this collection if it
exists |
PivotFacetValue |
getAt(int index)
Fetchs a
PivotFacetValue from this collection via the index, may not
be used to fetch the PivotFacetValue corrisponding to the missing-value. |
List<PivotFacetValue> |
getExplicitValuesList()
Read-Only access to the Collection of
PivotFacetValue s corrisponding to
non-missing values. |
int |
getExplicitValuesListSize()
Size of
getExplicitValuesList() |
PivotFacetValue |
getMissingValue()
|
List<PivotFacetValue> |
getNextLevelValuesToRefine()
Returns the appropriate sub-list of the explicit values that need to be refined,
based on the
FacetParams.FACET_OFFSET & FacetParams.FACET_LIMIT
for this field. |
Iterator<PivotFacetValue> |
iterator()
Iterator over all elements in this Collection, including the result of
getMissingValue() as the last element (if it exists) |
void |
markDirty()
Indicates that the values in this collection have been modified by the caller.
|
int |
size()
Total number of
PivotFacetValue s, including the "missing" value if used. |
void |
sort()
Sorts the collection and recursively sorts the collections assocaited with
any sub-pivots.
|
String |
toString() |
void |
trim()
Destructive method that recursively prunes values from the data structure
based on the counts for those values and the effective sort, mincount, limit,
and offset being used for each field.
|
public PivotFacetFieldValueCollection(int minCount, int offset, int limit, String fieldSort)
public void markDirty()
PivotFacetValue
s contained in this collection
must call this method after doing so.public PivotFacetValue getMissingValue()
PivotFacetValue
object, may be null
if we "missing" is not in use, or if it does not meat the mincount.public List<PivotFacetValue> getExplicitValuesList()
PivotFacetValue
s corrisponding to
non-missing values.getMissingValue()
public int getExplicitValuesListSize()
getExplicitValuesList()
public int size()
PivotFacetValue
s, including the "missing" value if used.getMissingValue()
,
getExplicitValuesList()
public List<PivotFacetValue> getNextLevelValuesToRefine()
FacetParams.FACET_OFFSET
& FacetParams.FACET_LIMIT
for this field.public PivotFacetValue get(Comparable value)
PivotFacetValue
from this collection if it
existsvalue
- of the PivotFacetValue
to lookup, if
null
this returns the same as getMissingValue()
PivotFacetValue
or null if there is
no PivotFacetValue
in this collection corrisponding to
the specified value.public PivotFacetValue getAt(int index)
PivotFacetValue
from this collection via the index, may not
be used to fetch the PivotFacetValue
corrisponding to the missing-value.public void add(PivotFacetValue pfValue)
PivotFacetValue
to this collection -- callers must not use this
method if a PivotFacetValue
with the same value already exists in this collectionpublic void trim()
This method should only be called after all refinement is completed.
public void sort()
FacetParams.FACET_SORT
,
PivotFacetField.sort()
public Iterator<PivotFacetValue> iterator()
getMissingValue()
as the last element (if it exists)iterator
in interface Iterable<PivotFacetValue>
Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.