Class Pointer

  • Direct Known Subclasses:
    FreqData, PPMContext, RarMemBlock, RarNode, State

    public abstract class Pointer
    extends java.lang.Object
    Simulates Pointers on a single mem block as a byte[]
    Version:
    $LastChangedRevision$
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected byte[] mem  
      protected int pos  
    • Constructor Summary

      Constructors 
      Constructor Description
      Pointer​(byte[] mem)
      Initialize the object with the array (may be null)
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getAddress()
      returns the position of this object in the byte[]
      void setAddress​(int pos)
      needs to set the fields of this object to the values in the byte[] at the given position.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • mem

        protected byte[] mem
      • pos

        protected int pos
    • Constructor Detail

      • Pointer

        public Pointer​(byte[] mem)
        Initialize the object with the array (may be null)
        Parameters:
        mem - the byte array
    • Method Detail

      • getAddress

        public int getAddress()
        returns the position of this object in the byte[]
        Returns:
        the address of this object
      • setAddress

        public void setAddress​(int pos)
        needs to set the fields of this object to the values in the byte[] at the given position. be aware of the byte order
        Parameters:
        pos - the position this object should point to