|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.lucene.util.AttributeImpl
public abstract class AttributeImpl
Base class for Attributes that can be added to a
AttributeSource
.
Attributes are used to add data in a dynamic, yet type-safe way to a source
of usually streamed objects, e. g. a TokenStream
.
Constructor Summary | |
---|---|
AttributeImpl()
|
Method Summary | |
---|---|
abstract void |
clear()
Clears the values in this AttributeImpl and resets it to its default value. |
Object |
clone()
Shallow clone. |
abstract void |
copyTo(AttributeImpl target)
Copies the values from this Attribute into the passed-in target attribute. |
abstract boolean |
equals(Object other)
All values used for computation of hashCode()
should be checked here for equality. |
abstract int |
hashCode()
Subclasses must implement this method and should compute a hashCode similar to this: |
String |
toString()
The default implementation of this method accesses all declared fields of this object and prints the values in the following syntax: |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public AttributeImpl()
Method Detail |
---|
public abstract void clear()
public String toString()
public String toString() { return "start=" + startOffset + ",end=" + endOffset; }This method may be overridden by subclasses.
toString
in class Object
public abstract int hashCode()
public int hashCode() { int code = startOffset; code = code * 31 + endOffset; return code; }see also
equals(Object)
hashCode
in class Object
public abstract boolean equals(Object other)
hashCode()
should be checked here for equality.
see also Object.equals(Object)
equals
in class Object
public abstract void copyTo(AttributeImpl target)
public Object clone()
clone
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |