package chat; import java.awt.*; import java.awt.event.*; import java.util.*; import javax.swing.*; import javax.swing.text.*; import javax.swing.event.*; import lava.net.psyc.UNI; /** * **/ public class User { /** * **/ private String _name; /** * **/ private UNI _identification; /** * **/ private int hashCode = -1; /** * **/ public User(String name, UNI identification) { _name = name; _identification = identification; } /** * **/ public UNI getIdentification() { return _identification; } /** * **/ public String toString() { return _name; } /** * **/ public int hashCode() { if(hashCode == -1) { hashCode = _identification.hashCode(); } return hashCode; } /** * **/ public boolean equals(Object obj) { return obj instanceof User && // _identification.equals(((User)obj)._identification); } }