Serializable, Cloneable, CategoryAttribute, org.apache.lucene.util.Attributepublic final class CategoryAttributeImpl extends org.apache.lucene.util.AttributeImpl implements CategoryAttribute
CategoryAttribute.| Modifier and Type | Field | Description |
|---|---|---|
protected CategoryPath |
categoryPath |
The category path instance.
|
protected HashMap<Class<? extends CategoryProperty>,CategoryProperty> |
properties |
A map of properties associated to the current category path.
|
| Constructor | Description |
|---|---|
CategoryAttributeImpl() |
Construct an empty CategoryAttributeImpl.
|
CategoryAttributeImpl(CategoryPath categoryPath) |
Construct a CategoryAttributeImpl with the given CategoryPath.
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
addProperty(CategoryProperty property) |
Add a property.
|
void |
clear() |
Resets this attribute to its initial value: a null category path and no
properties.
|
void |
clearProperties() |
Clear all properties.
|
CategoryAttribute |
clone() |
Clone this
CategoryAttribute. |
void |
copyTo(org.apache.lucene.util.AttributeImpl target) |
|
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.
|
protected CategoryPath categoryPath
protected HashMap<Class<? extends CategoryProperty>,CategoryProperty> properties
public CategoryAttributeImpl()
public CategoryAttributeImpl(CategoryPath categoryPath)
categoryPath - The category path to use.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)
CategoryAttributesetCategoryPath 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)
CategoryAttributegetProperty in interface CategoryAttributepropertyClass - The required property class.public CategoryProperty getProperty(Collection<Class<? extends CategoryProperty>> propertyClasses)
CategoryAttributegetProperty in interface CategoryAttributepropertyClasses - The property classes.public void copyTo(org.apache.lucene.util.AttributeImpl target)
copyTo in class org.apache.lucene.util.AttributeImplpublic CategoryAttribute clone()
CategoryAttributeCategoryAttribute.clone in interface CategoryAttributeclone in class org.apache.lucene.util.AttributeImplCategoryAttribute.public void clear()
CategoryAttributeclear in interface CategoryAttributeclear in class org.apache.lucene.util.AttributeImplpublic void clearProperties()
CategoryAttributeclearProperties in interface CategoryAttributepublic Set<Class<? extends CategoryProperty>> getPropertyClasses()
CategoryAttributegetPropertyClasses in interface CategoryAttributenull if
there are no properties.public void remove(Class<? extends CategoryProperty> propertyClass)
CategoryAttributeremove in interface CategoryAttributepropertyClass - The required property class.Copyright © 2000-2018 Apache Software Foundation. All Rights Reserved.