org.jcon.data
Class ReferenceCookie

java.lang.Object
  extended by org.jcon.data.MagicCookie
      extended by org.jcon.data.ReferenceCookie
All Implemented Interfaces:
java.io.Serializable

public class ReferenceCookie
extends MagicCookie

This is a cookie that contains another object. Kind of a fortune cookie, I guess. Its main purpose is to foil the object's native equals() method; useful when strict object equality is what you want, like in serialization mapping. Call it an identity wrapper.

Author:
Paul Reavis
See Also:
Serialized Form

Constructor Summary
ReferenceCookie()
           
ReferenceCookie(java.lang.Object contents)
           
 
Method Summary
 boolean equals(java.lang.Object nother)
           
 java.lang.Object getContents()
           
 int hashCode()
           
 void setContents(java.lang.Object newContents)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReferenceCookie

public ReferenceCookie()

ReferenceCookie

public ReferenceCookie(java.lang.Object contents)
Method Detail

equals

public boolean equals(java.lang.Object nother)
Overrides:
equals in class MagicCookie

hashCode

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

getContents

public java.lang.Object getContents()

setContents

public void setContents(java.lang.Object newContents)