|
|||||||||
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.analysis.tokenattributes.KeywordAttributeImpl
public final class KeywordAttributeImpl
This attribute can be used to mark a token as a keyword. Keyword aware
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
.
Constructor Summary | |
---|---|
KeywordAttributeImpl()
|
Method Summary | |
---|---|
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(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 . |
Methods inherited from class org.apache.lucene.util.AttributeImpl |
---|
clone, reflectAsString, reflectWith |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public KeywordAttributeImpl()
Method Detail |
---|
public void clear()
AttributeImpl
clear
in class AttributeImpl
public void copyTo(AttributeImpl target)
AttributeImpl
copyTo
in class AttributeImpl
public int hashCode()
hashCode
in class Object
public boolean equals(Object obj)
equals
in class 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
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |