Package uk.ac.bristol.star.cdf.record
Class Pointer
- java.lang.Object
-
- uk.ac.bristol.star.cdf.record.Pointer
-
public class Pointer extends java.lang.ObjectKeeps track of a file offset.- Since:
- 18 Jun 2013
-
-
Constructor Summary
Constructors Constructor Description Pointer(long value)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longget()Returns this pointer's current value.longgetAndIncrement(int increment)Returns this pointer's current value and increments it by a given step.voidset(long value)Sets this pointer's current 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
-
-