morfologik.stemming
Class WordData

java.lang.Object
  extended by morfologik.stemming.WordData
All Implemented Interfaces:
java.lang.Cloneable

public final class WordData
extends java.lang.Object
implements java.lang.Cloneable

Stem and tag data associated with a given word.

Important notes:


Method Summary
protected  WordData clone()
          Declare a covariant of Object.clone() that returns a deep copy of this object.
 boolean equals(java.lang.Object obj)
           
 java.lang.CharSequence getStem()
           
 java.nio.ByteBuffer getStemBytes(java.nio.ByteBuffer target)
          Copy the stem's binary data (no charset decoding) to a custom byte buffer.
 java.lang.CharSequence getTag()
           
 java.nio.ByteBuffer getTagBytes(java.nio.ByteBuffer target)
          Copy the tag's binary data (no charset decoding) to a custom byte buffer.
 java.lang.CharSequence getWord()
           
 java.nio.ByteBuffer getWordBytes(java.nio.ByteBuffer target)
          Copy the inflected word's binary data (no charset decoding) to a custom byte buffer.
 int hashCode()
           
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getStemBytes

public java.nio.ByteBuffer getStemBytes(java.nio.ByteBuffer target)
Copy the stem's binary data (no charset decoding) to a custom byte buffer. If the buffer is null or not large enough to hold the result, a new buffer is allocated.

Parameters:
target - Target byte buffer to copy the stem buffer to or null if a new buffer should be allocated.
Returns:
Returns target or the new reallocated buffer.

getTagBytes

public java.nio.ByteBuffer getTagBytes(java.nio.ByteBuffer target)
Copy the tag's binary data (no charset decoding) to a custom byte buffer. If the buffer is null or not large enough to hold the result, a new buffer is allocated.

Parameters:
target - Target byte buffer to copy the tag buffer to or null if a new buffer should be allocated.
Returns:
Returns target or the new reallocated buffer.

getWordBytes

public java.nio.ByteBuffer getWordBytes(java.nio.ByteBuffer target)
Copy the inflected word's binary data (no charset decoding) to a custom byte buffer. If the buffer is null or not large enough to hold the result, a new buffer is allocated.

Parameters:
target - Target byte buffer to copy the word buffer to or null if a new buffer should be allocated.
Returns:
Returns target or the new reallocated buffer.

getTag

public java.lang.CharSequence getTag()
Returns:
Return tag data decoded to a character sequence or null if no associated tag data exists.

getStem

public java.lang.CharSequence getStem()
Returns:
Return stem data decoded to a character sequence or null if no associated stem data exists.

getWord

public java.lang.CharSequence getWord()
Returns:
Return inflected word form data. Usually the parameter passed to DictionaryLookup.lookup(CharSequence).

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

clone

protected WordData clone()
Declare a covariant of Object.clone() that returns a deep copy of this object. The content of all internal buffers is copied.

Overrides:
clone in class java.lang.Object