edu.cmu.cs.crystal.util
Class Box<T>

java.lang.Object
  extended by edu.cmu.cs.crystal.util.Box<T>

public class Box<T>
extends Object

Holds a boxed value. A boxed value is one that can be changed and read.

Author:
Nels E. Beckman

Constructor Summary
Box(T t)
           
 
Method Summary
static
<T> Box<T>
box(T t)
           
 boolean equals(Object obj)
           
 T getValue()
           
 int hashCode()
           
 void setValue(T t)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Box

public Box(T t)
Method Detail

box

public static <T> Box<T> box(T t)

getValue

public T getValue()

setValue

public void setValue(T t)

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

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

toString

public String toString()
Overrides:
toString in class Object