public final class KeywordAttributeImpl extends AttributeImpl implements KeywordAttribute
TokenStream
s 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, toString
public void clear()
AttributeImpl
clear
in class AttributeImpl
public void copyTo(AttributeImpl target)
AttributeImpl
copyTo
in class AttributeImpl
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public boolean isKeyword()
true
iff the current token is a keyword, otherwise
false
/isKeyword
in interface KeywordAttribute
true
iff the current token is a keyword, otherwise
false
/public void setKeyword(boolean isKeyword)
true
.setKeyword
in interface KeywordAttribute
isKeyword
- true
iff the current token is a keyword, otherwise
false
.Copyright © 2000-2018 Apache Software Foundation. All Rights Reserved.