Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.mom4j.ostore
Class Sequence  view Sequence download Sequence.java

java.lang.Object
  extended byorg.mom4j.ostore.Sequence

public class Sequence
extends java.lang.Object


Field Summary
private  java.io.RandomAccessFile file
           
static int MAX_NAME_LENGTH
           
private  java.lang.String name
           
private  long seqStartPtr
           
private  long value
           
 
Constructor Summary
  Sequence(java.lang.String name)
           
private Sequence(java.lang.String name, long seqStartPtr, java.io.RandomAccessFile f)
           
 
Method Summary
(package private)  long currentValue()
           
 java.lang.String getName()
           
private  java.lang.String getWritableName()
           
private  void init()
           
(package private)  long nextValue()
           
(package private) static Sequence read(java.io.RandomAccessFile file)
           
(package private)  void setRandomAccessFile(java.io.RandomAccessFile f)
           
 java.lang.String toString()
          Convert this Object to a human-readable String.
(package private)  void writeHeader()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

MAX_NAME_LENGTH

public static final int MAX_NAME_LENGTH
See Also:
Constant Field Values

name

private java.lang.String name

value

private long value

seqStartPtr

private long seqStartPtr

file

private java.io.RandomAccessFile file
Constructor Detail

Sequence

private Sequence(java.lang.String name,
                 long seqStartPtr,
                 java.io.RandomAccessFile f)
          throws java.io.IOException

Sequence

public Sequence(java.lang.String name)
Method Detail

init

private void init()
           throws java.io.IOException

getName

public java.lang.String getName()

getWritableName

private java.lang.String getWritableName()

nextValue

long nextValue()
         throws java.io.IOException

currentValue

long currentValue()

writeHeader

void writeHeader()
           throws java.io.IOException

setRandomAccessFile

void setRandomAccessFile(java.io.RandomAccessFile f)

read

static Sequence read(java.io.RandomAccessFile file)
              throws java.io.IOException

toString

public java.lang.String toString()
Description copied from class: java.lang.Object
Convert this Object to a human-readable String. There are no limits placed on how long this String should be or what it should contain. We suggest you make it as intuitive as possible to be able to place it into System.out.println() 55 and such.

It is typical, but not required, to ensure that this method never completes abruptly with a java.lang.RuntimeException.

This method will be called when performing string concatenation with this object. If the result is null, string concatenation will instead use "null".

The default implementation returns getClass().getName() + "@" + Integer.toHexString(hashCode()).