Class Pointer


  • public class Pointer
    extends java.lang.Object
    Keeps 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
      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