com.browseengine.bobo.facets.impl
Class DefaultFacetIterator

java.lang.Object
  extended by com.browseengine.bobo.api.FacetIterator
      extended by com.browseengine.bobo.facets.impl.DefaultFacetIterator
All Implemented Interfaces:
Iterator<Comparable>

public class DefaultFacetIterator
extends FacetIterator

Author:
nnarkhed

Field Summary
 
Fields inherited from class com.browseengine.bobo.api.FacetIterator
count, facet
 
Constructor Summary
DefaultFacetIterator(TermValueList valList, int[] counts, int countlength, boolean zeroBased)
           
 
Method Summary
 String format(Object val)
           
 boolean hasNext()
           
 Comparable next()
          Moves the iteration to the next facet
 Comparable next(int minHits)
          Moves the iteration to the next facet whose hitcount >= minHits. returns null if there is no facet whose hitcount >= minHits.
 void remove()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultFacetIterator

public DefaultFacetIterator(TermValueList valList,
                            int[] counts,
                            int countlength,
                            boolean zeroBased)
Method Detail

hasNext

public boolean hasNext()

next

public Comparable next()
Description copied from class: FacetIterator
Moves the iteration to the next facet

Specified by:
next in interface Iterator<Comparable>
Specified by:
next in class FacetIterator
Returns:
the next facet value

remove

public void remove()

next

public Comparable next(int minHits)
Description copied from class: FacetIterator
Moves the iteration to the next facet whose hitcount >= minHits. returns null if there is no facet whose hitcount >= minHits. Hence while using this method, it is useless to use hasNext() with it. After the next() method returns null, calling it repeatedly would result in undefined behavior

Specified by:
next in class FacetIterator
Returns:
The next facet value. It returns null if there is no facet whose hitcount >= minHits.

format

public String format(Object val)
Specified by:
format in class FacetIterator


Copyright © 2011. All Rights Reserved.