de.aitools.aq.invertedindex.core
Class Postlist.Head

java.lang.Object
  extended by com.sun.jna.Structure
      extended by de.aitools.aq.invertedindex.core.Postlist.Head
Enclosing class:
Postlist<V extends Value>

public static class Postlist.Head
extends com.sun.jna.Structure

A class representing the head of a postlist, that contains some meta-information.

Author:
martin.trenkmann@uni-weimar.de

Nested Class Summary
 
Nested classes/interfaces inherited from class com.sun.jna.Structure
com.sun.jna.Structure.ByReference, com.sun.jna.Structure.ByValue
 
Field Summary
 int totalSize
           
 int valueCount
           
 short valueSize
           
 
Fields inherited from class com.sun.jna.Structure
ALIGN_DEFAULT, ALIGN_GNUC, ALIGN_MSVC, ALIGN_NONE
 
Constructor Summary
Postlist.Head()
           
 
Method Summary
 int getTotalSize()
          The total size in bytes of all values stored in the referenced postlist.
 int getValueCount()
          Returns the number of values stored in the corresponding postlist.
 short getValueSize()
          The native size in bytes of a single postlist value.
 java.io.PrintStream print(java.io.PrintStream stream)
          Prints the content of this object in a human-readable form to the given PrintStream.
 
Methods inherited from class com.sun.jna.Structure
autoRead, autoRead, autoWrite, autoWrite, clear, equals, getAutoRead, getAutoWrite, getPointer, hashCode, newInstance, read, readField, setAutoRead, setAutoSynch, setAutoWrite, size, toArray, toArray, toString, toString, write, writeField, writeField
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

valueCount

public int valueCount

valueSize

public short valueSize

totalSize

public int totalSize
Constructor Detail

Postlist.Head

public Postlist.Head()
Method Detail

getValueCount

public int getValueCount()
Returns the number of values stored in the corresponding postlist.

Returns:
the length of the postlist

getValueSize

public short getValueSize()
The native size in bytes of a single postlist value. If this size is not constant as for SingleInt for instance, but variable as for SingleString, the returned value is zero.

Returns:
the size of some value in bytes

getTotalSize

public int getTotalSize()
The total size in bytes of all values stored in the referenced postlist.

Returns:
the size of the postlist's payload

print

public java.io.PrintStream print(java.io.PrintStream stream)
Prints the content of this object in a human-readable form to the given PrintStream.

Parameters:
stream - the stream to print to
Returns:
the stream instance itself