org.e2etrace.trace
Class AbstractTraceStepId

java.lang.Object
  extended by org.e2etrace.trace.AbstractTraceStepId
All Implemented Interfaces:
Serializable, ITraceStepId
Direct Known Subclasses:
MethodTraceStepId, SimpleTraceStepId, TraceSessionRootStepId

public class AbstractTraceStepId
extends Object
implements ITraceStepId, Serializable

Base class for trace step ids.

This class ensures that all trace step id use the same equals and hashCode implementation based on the string representation of the trace step id.

Author:
Gunther Popp
See Also:
Serialized Form

Constructor Summary
protected AbstractTraceStepId(String idAsString)
          Constructor.
 
Method Summary
 String asString()
          Returns a String representation of the trace step id.
 boolean equals(Object obj)
          
 int hashCode()
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractTraceStepId

protected AbstractTraceStepId(String idAsString)
Constructor.

Parameters:
idAsString - string representation of the trace step id.

Method Detail

hashCode

public int hashCode()

Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)

Overrides:
equals in class Object

asString

public String asString()
Returns a String representation of the trace step id.

In contrast to toString the String representation should be suitable to be used in log and configuration files. Additionally it must uniquely identify an id.

Specified by:
asString in interface ITraceStepId
Returns:
String representation of the trace step id


Copyright © 2013 Gunther Popp. All Rights Reserved.