org.mondemand
Class TraceId

java.lang.Object
  extended by org.mondemand.TraceId
All Implemented Interfaces:
Serializable, Comparable<TraceId>

public class TraceId
extends Object
implements Serializable, Comparable<TraceId>

See Also:
Serialized Form

Field Summary
static TraceId NULL_TRACE_ID
           
 
Constructor Summary
TraceId()
          Default constructor, if no id is given
TraceId(long id)
          Create a trace ID with the given identifier
 
Method Summary
 int compareTo(TraceId traceId)
          Compares this TraceId with another.
 boolean equals(Object obj)
           
 long getId()
          Accessor which returns the identifier for this trace id
 int hashCode()
           
 void setId(long newId)
          Mutator which allows the identifier to be overwritten
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NULL_TRACE_ID

public static final TraceId NULL_TRACE_ID
Constructor Detail

TraceId

public TraceId(long id)
Create a trace ID with the given identifier

Parameters:
id - the identifier to use

TraceId

public TraceId()
Default constructor, if no id is given

Method Detail

getId

public long getId()
Accessor which returns the identifier for this trace id

Returns:
the id as a long

setId

public void setId(long newId)
Mutator which allows the identifier to be overwritten

Parameters:
newId - the new identifier for this trace id

compareTo

public int compareTo(TraceId traceId)
Compares this TraceId with another.

Specified by:
compareTo in interface Comparable<TraceId>
Returns:
1 if the caller's id is greater than the arg's id, -1 if it is less than, and 0 if they are equal.

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2012. All Rights Reserved.