public final class KeywordAttributeImpl extends AttributeImpl implements KeywordAttribute
TokenStreams can decide to modify a token based on the return value
of isKeyword() if the token is modified. Stemming filters for
instance can use this attribute to conditionally skip a term if
isKeyword() returns true.enableBackwards| Constructor and Description |
|---|
KeywordAttributeImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clears the values in this AttributeImpl and resets it to its
default value.
|
void |
copyTo(AttributeImpl target)
Copies the values from this Attribute into the passed-in
target attribute.
|
boolean |
equals(java.lang.Object obj) |
int |
hashCode() |
boolean |
isKeyword()
Returns
true iff the current token is a keyword, otherwise
false/ |
void |
setKeyword(boolean isKeyword)
Marks the current token as keyword iff set to
true. |
clone, reflectAsString, reflectWith, toStringpublic void clear()
AttributeImplclear in class AttributeImplpublic void copyTo(AttributeImpl target)
AttributeImplcopyTo in class AttributeImplpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic boolean isKeyword()
true iff the current token is a keyword, otherwise
false/isKeyword in interface KeywordAttributetrue iff the current token is a keyword, otherwise
false/public void setKeyword(boolean isKeyword)
true.setKeyword in interface KeywordAttributeisKeyword - true iff the current token is a keyword, otherwise
false.Copyright © 2000-2022 Apache Software Foundation. All Rights Reserved.