|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.lucene.util.AttributeImpl
org.apache.lucene.facet.index.attributes.CategoryAttributeImpl
public final class CategoryAttributeImpl
An implementation of CategoryAttribute.
| Field Summary | |
|---|---|
protected CategoryPath |
categoryPath
The category path instance. |
protected HashMap<Class<? extends CategoryProperty>,CategoryProperty> |
properties
A map of properties associated to the current category path. |
| Fields inherited from class org.apache.lucene.util.AttributeImpl |
|---|
enableBackwards |
| Constructor Summary | |
|---|---|
CategoryAttributeImpl()
Construct an empty CategoryAttributeImpl. |
|
CategoryAttributeImpl(CategoryPath categoryPath)
Construct a CategoryAttributeImpl with the given CategoryPath. |
|
| Method Summary | |
|---|---|
void |
addProperty(CategoryProperty property)
Add a property. |
void |
clear()
Clears the values in this AttributeImpl and resets it to its default value. |
void |
clearProperties()
Clear all properties. |
CategoryAttribute |
clone()
Shallow clone. |
void |
copyTo(AttributeImpl target)
Copies the values from this Attribute into the passed-in target attribute. |
boolean |
equals(Object o)
|
CategoryPath |
getCategoryPath()
Returns the category path value. |
CategoryProperty |
getProperty(Class<? extends CategoryProperty> propertyClass)
Get a property of a certain property class. |
CategoryProperty |
getProperty(Collection<Class<? extends CategoryProperty>> propertyClasses)
Get a property of one of given property classes. |
Set<Class<? extends CategoryProperty>> |
getPropertyClasses()
Get all the active property classes. |
int |
hashCode()
|
void |
remove(Class<? extends CategoryProperty> propertyClass)
Remove an property of a certain property class. |
void |
set(CategoryAttribute other)
Set the content of this CategoryAttribute from another
CategoryAttribute object. |
void |
setCategoryPath(CategoryPath cp)
Sets the category path value of this attribute. |
| Methods inherited from class org.apache.lucene.util.AttributeImpl |
|---|
reflectAsString, reflectWith, toString |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected CategoryPath categoryPath
protected HashMap<Class<? extends CategoryProperty>,CategoryProperty> properties
| Constructor Detail |
|---|
public CategoryAttributeImpl()
public CategoryAttributeImpl(CategoryPath categoryPath)
categoryPath - The category path to use.| Method Detail |
|---|
public void set(CategoryAttribute other)
CategoryAttributeCategoryAttribute from another
CategoryAttribute object.
set in interface CategoryAttributeother - The CategoryAttribute to take the content from.public CategoryPath getCategoryPath()
getCategoryPath in interface CategoryAttributepublic void setCategoryPath(CategoryPath cp)
CategoryAttribute
setCategoryPath in interface CategoryAttributecp - A category path. May not be null.
public void addProperty(CategoryProperty property)
throws UnsupportedOperationException
CategoryAttributeCategoryAttribute.getProperty(Class) with this property class .
addProperty in interface CategoryAttributeproperty - The property to add.
UnsupportedOperationException - When attempting to add a property of a class that was added
before and merge is prohibited.public CategoryProperty getProperty(Class<? extends CategoryProperty> propertyClass)
CategoryAttribute
getProperty in interface CategoryAttributepropertyClass - The required property class.
public CategoryProperty getProperty(Collection<Class<? extends CategoryProperty>> propertyClasses)
CategoryAttribute
getProperty in interface CategoryAttributepropertyClasses - The property classes.
public void copyTo(AttributeImpl target)
AttributeImpl
copyTo in class AttributeImplpublic CategoryAttribute clone()
AttributeImpl
clone in interface CategoryAttributeclone in class AttributeImplCategoryAttribute.public void clear()
AttributeImpl
clear in interface CategoryAttributeclear in class AttributeImplpublic void clearProperties()
CategoryAttribute
clearProperties in interface CategoryAttributepublic boolean equals(Object o)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic Set<Class<? extends CategoryProperty>> getPropertyClasses()
CategoryAttribute
getPropertyClasses in interface CategoryAttributenull if
there are no properties.public void remove(Class<? extends CategoryProperty> propertyClass)
CategoryAttribute
remove in interface CategoryAttributepropertyClass - The required property class.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||