com.grandcentral.appstats.util
Interface BufferIterator

All Known Implementing Classes:
RingBufferIterator

public interface BufferIterator

An interface for a multi-type buffer space.

Version:
$Version: $
Author:
Adrian Dorsman, Taras Shkvarchuk

Method Summary
 boolean containsType(int type)
           
 double currentDouble()
           
 double currentLong()
           
 java.lang.Object currentObject()
           
 int getType()
           
 boolean hasNext()
           
 boolean hasPrevious()
           
 void moveToEnd()
          moves to the end (most recent value) of the buffer
 void moveToStart()
          moves to the start (oldest value) of the buffer
 double nextDouble()
           
 long nextLong()
           
 java.lang.Object nextObject()
           
 double previousDouble()
           
 long previousLong()
           
 java.lang.Object previousObject()
           
 int size()
           
 

Method Detail

getType

public int getType()

containsType

public boolean containsType(int type)

moveToEnd

public void moveToEnd()
moves to the end (most recent value) of the buffer

moveToStart

public void moveToStart()
moves to the start (oldest value) of the buffer

hasNext

public boolean hasNext()

hasPrevious

public boolean hasPrevious()

size

public int size()
Returns:
the number of values in the buffer

nextLong

public long nextLong()
Returns:
next val or last val if we're at end of buffer

previousLong

public long previousLong()
Returns:
previous val or first val if we're at start of buffer

currentLong

public double currentLong()
Returns:
current val and don't move index in underlying buffer space

nextDouble

public double nextDouble()
Returns:
next val or last val if we're at end of buffer

previousDouble

public double previousDouble()
Returns:
previous val or first val if we're at start of buffer

currentDouble

public double currentDouble()
Returns:
current val and don't move index in underlying buffer space

nextObject

public java.lang.Object nextObject()
Returns:
next val or last val if we're at end of buffer

previousObject

public java.lang.Object previousObject()
Returns:
previous val or first val if we're at start of buffer

currentObject

public java.lang.Object currentObject()
Returns:
current val and don't move index in underlying buffer space