TPTP 4.2.0 Platform Project
Public API Specification

org.eclipse.hyades.collection.correlation
Class CorrelatorStack

java.lang.Object
  extended byorg.eclipse.hyades.collection.correlation.Stack
      extended byorg.eclipse.hyades.collection.correlation.CorrelatorStack

public class CorrelatorStack
extends Stack

This is a stack for managing the instances of ICorrelatorData for a specific key, which implements java.util.Comparator. Contextual data can be pushed onto and popped off the stack, and an operation counter also exists to keep track of the number of local Stack.push(Object) operations.


Field Summary
 
Fields inherited from class org.eclipse.hyades.collection.correlation.Stack
increment, privateStorage, stack, top
 
Constructor Summary
CorrelatorStack(java.util.Comparator key, int size, int increment)
          Creates an empty stack of size with an increment for holding instances of ICorrelatorData associated with key.
 
Method Summary
 java.util.Comparator getKey()
          Returns the key assocaited with this stack.
 long getOperationCounter()
          Returns the current value of the operation counter.
 long incrementOperationCounter()
          Increments the current value of the operation counter by 1, and returns its new value.
 
Methods inherited from class org.eclipse.hyades.collection.correlation.Stack
peek, peek, pop, push
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CorrelatorStack

public CorrelatorStack(java.util.Comparator key,
                       int size,
                       int increment)
Creates an empty stack of size with an increment for holding instances of ICorrelatorData associated with key.

Parameters:
key - any user-defined unique identifier for a this stack
size - the initial size of the stack
increment - the size by which the stack grows if its current capacity is insufficient
Method Detail

getKey

public java.util.Comparator getKey()
Returns the key assocaited with this stack.

Returns:
the key associated with this stack.

getOperationCounter

public long getOperationCounter()
Returns the current value of the operation counter.

Returns:
the current value of the operation counter.

incrementOperationCounter

public long incrementOperationCounter()
Increments the current value of the operation counter by 1, and returns its new value.

Returns:
the current value of the operation counter, plus 1

TPTP 4.2.0 Platform Project
Public API Specification