com.browseengine.bobo.facets.impl
Class DefaultLongFacetIterator

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

public class DefaultLongFacetIterator
extends LongFacetIterator

Author:
"Xiaoyang Gu"

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

Field Detail

_valList

public TermLongList _valList
Constructor Detail

DefaultLongFacetIterator

public DefaultLongFacetIterator(TermLongList valList,
                                int[] countarray,
                                int countlength,
                                boolean zeroBased)
Method Detail

getFacet

public String getFacet()

format

public String format(long val)
Specified by:
format in class LongFacetIterator

format

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

getFacetCount

public int getFacetCount()

hasNext

public boolean hasNext()

next

public String 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

nextLong

public long nextLong()
Specified by:
nextLong in class LongFacetIterator

remove

public void remove()

next

public String 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.

nextLong

public long nextLong(int minHits)
Specified by:
nextLong in class LongFacetIterator


Copyright © 2011. All Rights Reserved.