|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjpaul.Misc.MCell<T>
public class MCell<T>
MCell is a mutable cell with content of type
T. Sometimes useful when using anonymous classes that
can access only final variables of the surounding method: we
declare a final variable pointing to a mutable cell, and the
anonymous class is free to mutate the cell's content.
| Field Summary | |
|---|---|
T |
value
The current content of this cell. |
| Constructor Summary | |
|---|---|
MCell(T initValue)
Creates a MutableCell. |
|
| Method Summary | |
|---|---|
java.lang.String |
toString()
Returns a string description containing both the value and the address of this MCell:
"MCell{" + value + "}@" +
System.identityHashCode(this). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public T value
| Constructor Detail |
|---|
public MCell(T initValue)
MutableCell.
| Method Detail |
|---|
public java.lang.String toString()
this MCell:
"MCell{" + value + "}@" +
System.identityHashCode(this).
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||