org.owasp.webscarab.model
Class ConversationID

java.lang.Object
  extended by org.owasp.webscarab.model.ConversationID
All Implemented Interfaces:
java.lang.Comparable

public class ConversationID
extends java.lang.Object
implements java.lang.Comparable

provides a link to a conversation in the model

Author:
knoppix

Constructor Summary
ConversationID()
          Creates a new instance of ConversationID.
ConversationID(int id)
           
ConversationID(java.lang.String id)
          creates a Conversation ID based on the string provided.
 
Method Summary
 int compareTo(java.lang.Object o)
          compares this ConversationID to another
 boolean equals(java.lang.Object o)
          compares this ConversationID to another
protected  int getID()
           
 int hashCode()
           
static void reset()
          resets the ConversationID counter to zero.
 java.lang.String toString()
          shows a string representation of the ConversationID
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ConversationID

public ConversationID()
Creates a new instance of ConversationID. Each ConversationID created using this constructor will be unique (currently based on an incrementing integer value)


ConversationID

public ConversationID(int id)

ConversationID

public ConversationID(java.lang.String id)
creates a Conversation ID based on the string provided. The next no-parameter ConversationID created will be "greater" than this one.

Parameters:
id - a string representation of the ConversationID
Method Detail

reset

public static void reset()
resets the ConversationID counter to zero.


getID

protected int getID()

toString

public java.lang.String toString()
shows a string representation of the ConversationID

Overrides:
toString in class java.lang.Object
Returns:
a string representation

equals

public boolean equals(java.lang.Object o)
compares this ConversationID to another

Overrides:
equals in class java.lang.Object
Parameters:
o - the other ConversationID to compare to
Returns:
true if they are equal, false otherwise

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object
Returns:

compareTo

public int compareTo(java.lang.Object o)
compares this ConversationID to another

Specified by:
compareTo in interface java.lang.Comparable
Parameters:
o - the other ConversationID to compare to
Returns:
-1, 0 or 1 if this ConversationID is less than, equal to, or greater than the supplied parameter