uk.ac.bristol.star.cdf.record
Class Pointer

java.lang.Object
  extended by uk.ac.bristol.star.cdf.record.Pointer

public class Pointer
extends java.lang.Object

Keeps track of a file offset.

Since:
18 Jun 2013

Constructor Summary
Pointer(long value)
          Constructor.
 
Method Summary
 long get()
          Returns this pointer's current value.
 long getAndIncrement(int increment)
          Returns this pointer's current value and increments it by a given step.
 void set(long value)
          Sets this pointer's current value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Pointer

public Pointer(long value)
Constructor.

Parameters:
value - initial value
Method Detail

get

public long get()
Returns this pointer's current value.

Returns:
value

getAndIncrement

public long getAndIncrement(int increment)
Returns this pointer's current value and increments it by a given step.

Parameters:
increment - amount to increase value by
Returns:
pre-increment value

set

public void set(long value)
Sets this pointer's current value.

Parameters:
value - new value