gishur.core.algorithms
Class TraceLabel

java.lang.Object
  |
  +--gishur.core.algorithms.TraceLabel

public class TraceLabel
extends java.lang.Object

An instance of TraceLabel represents a recorded step in an algorithm. Such a step can be recorded via the Tracer.recordLabel(java.lang.String, int, int) method of a Tracer. The TraceLabel will be used to access items via its object(java.lang.String) method, that where recorded through TraceObject.record(java.lang.Object) directly before the TraceLabel was recorded.

Version:
1.0
Author:
Thomas Wolf

Field Summary
static int NORMAL_TYPE
          Type-constant for label types.
 
Method Summary
 int level()
           
 java.lang.String name()
           
 TraceLabel next()
           
 TraceLabel next(int level)
           
 TraceLabel nextUp()
           
 int number()
           
 java.lang.Object object(java.lang.String name)
          Returns the actual (for this TraceLabel) value of the specified object.
 java.lang.Object[] objectHistory(java.lang.String name)
          Returns an array with the history of the specified object.
 Tracer parent()
           
 TraceLabel prev()
           
 TraceLabel prev(int level)
           
 TraceLabel prevUp()
           
 long time()
           
 java.lang.String toString()
           
 java.lang.String toString(java.lang.String prefix, boolean useid)
           
 int type()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NORMAL_TYPE

public static final int NORMAL_TYPE
Type-constant for label types.
Method Detail

parent

public Tracer parent()

name

public java.lang.String name()

type

public int type()

time

public long time()

level

public int level()

number

public int number()

object

public java.lang.Object object(java.lang.String name)
Returns the actual (for this TraceLabel) value of the specified object.
Parameters:
name - the identifying name of the object
Returns:
the actual value

objectHistory

public java.lang.Object[] objectHistory(java.lang.String name)
Returns an array with the history of the specified object. The history contains all instances recorded back to a TraceLabel with a lower level depth.
Parameters:
name - the identifying name of the object
Returns:
array with the history of the specified object.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

toString

public java.lang.String toString(java.lang.String prefix,
                                 boolean useid)

next

public TraceLabel next()

prev

public TraceLabel prev()

prevUp

public TraceLabel prevUp()

nextUp

public TraceLabel nextUp()

prev

public TraceLabel prev(int level)

next

public TraceLabel next(int level)