one.world.core
Class Box

java.lang.Object
  |
  +--one.world.core.Box
All Implemented Interfaces:
Serializable

public class Box
extends Object
implements Serializable

Implementation of a box. A box is a container for a serialized object that can be used to embed an arbritrary object in a tuple. The contents of a box can be retrieved using the Component.unbox(one.world.core.Box) method.

Version:
$Revision: 1.1 $
See Also:
Tuple, Serialized Form

Constructor Summary
Box(Object o)
          Create a new box with the specified object.
 
Method Summary
 boolean equals(Object o)
          Determine whether this box equals the specified object.
 int hashCode()
          Return a hash code for this box.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Box

public Box(Object o)
    throws IOException
Create a new box with the specified object. The specified object must be serializable. It may be null.
Parameters:
o - The object for the new box.
Throws:
IOException - Signals an exceptional condition while serializing the specified object.
Method Detail

equals

public boolean equals(Object o)
Determine whether this box equals the specified object. This box equals the specified object, if the specified object also is a box containing an object whose serialized representation is the same as the serialized representation of the object carried by this box.
Overrides:
equals in class Object

hashCode

public int hashCode()
Return a hash code for this box.
Overrides:
hashCode in class Object


(C) Copyright 2001 UW CSE