org.apache.lucene.facet.associations
Class CategoryAssociationsContainer

java.lang.Object
  extended by org.apache.lucene.facet.associations.CategoryAssociationsContainer
All Implemented Interfaces:
Iterable<CategoryPath>

public class CategoryAssociationsContainer
extends Object
implements Iterable<CategoryPath>

Holds CategoryAssociation per CategoryPath.


Constructor Summary
CategoryAssociationsContainer()
           
 
Method Summary
 void clear()
          Clears all category associations.
 CategoryAssociation getAssociation(CategoryPath category)
          Returns the CategoryAssociation that was set for the category, or null if none was defined.
 Iterator<CategoryPath> iterator()
           
 void setAssociation(CategoryPath category, CategoryAssociation association)
          Adds the CategoryAssociation for the given category.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CategoryAssociationsContainer

public CategoryAssociationsContainer()
Method Detail

setAssociation

public void setAssociation(CategoryPath category,
                           CategoryAssociation association)
Adds the CategoryAssociation for the given category. Overrides any assocation that was previously set. It is ok to pass null, in which case the category will be treated as a regular one (i.e. without association value).


getAssociation

public CategoryAssociation getAssociation(CategoryPath category)
Returns the CategoryAssociation that was set for the category, or null if none was defined.


iterator

public Iterator<CategoryPath> iterator()
Specified by:
iterator in interface Iterable<CategoryPath>

clear

public void clear()
Clears all category associations.


toString

public String toString()
Overrides:
toString in class Object


Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.