com.borland.primetime.ide
Class Context

java.lang.Object
  |
  +--com.borland.primetime.ide.Context

public class Context
extends java.lang.Object

Context is used as a convenience class to package up the Browser/Node pair for use in Hashtables. This is frequently used by NodeViewerFactory implementations that need to provide a new instance of a NodeViewer per unique Browser/Node pairing.


Constructor Summary
Context(Browser browser, Node node)
          Constructs a Context object with the specified browser and node.
 
Method Summary
 boolean equals(java.lang.Object o)
          Compares two Context object to see if they wrap the same Browser and Node.
 Browser getBrowser()
          Returns the browser associated with this IDE context.
 Node getNode()
          Returns the node associated with this IDE context.
 int hashCode()
          Overrides so that two Context instances that wrap the same Browser and Node will return the same value.
 java.lang.String toString()
          Override to provide output showing the Browser and Node being wrapped.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Context

public Context(Browser browser,
               Node node)
Constructs a Context object with the specified browser and node.
Parameters:
browser - The Browser to which this Node belongs.
node - The Node.
Method Detail

getBrowser

public Browser getBrowser()
Returns the browser associated with this IDE context.
Returns:
The Browser reference.

getNode

public Node getNode()
Returns the node associated with this IDE context.
Returns:
The Node reference.

equals

public boolean equals(java.lang.Object o)
Compares two Context object to see if they wrap the same Browser and Node.
Overrides:
equals in class java.lang.Object
Parameters:
o - An instance of Context.
Returns:
True if both Context objects wrap the same Browser and Node.

hashCode

public int hashCode()
Overrides so that two Context instances that wrap the same Browser and Node will return the same value.
Overrides:
hashCode in class java.lang.Object
Returns:
A hash code which reflects what is wrapped rather than the wrappee.

toString

public java.lang.String toString()
Override to provide output showing the Browser and Node being wrapped.
Overrides:
toString in class java.lang.Object
Returns:
A String that contains the browser.toString() and node.toString().