LUCENE-917: Javadoc improvements for org.apache.lucene.index.Payload

git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@545693 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael Busch 2007-06-09 04:52:38 +00:00
parent 994f083846
commit 53ef7398ce
1 changed files with 9 additions and 0 deletions

View File

@ -41,10 +41,16 @@ import org.apache.lucene.analysis.TokenStream;
*/
// TODO: Remove warning after API has been finalized
public class Payload implements Serializable {
/** the byte array containing the payload data */
protected byte[] data;
/** the offset within the byte array */
protected int offset;
/** the length of the payload data */
protected int length;
/** Creates an empty payload and does not allocate a byte array. */
protected Payload() {
// no-arg constructor since this class implements Serializable
}
@ -74,6 +80,9 @@ import org.apache.lucene.analysis.TokenStream;
this.length = length;
}
/**
* Returns the length of the payload data.
*/
public int length() {
return this.length;
}