001         package com.croftsoft.apps.chat.request;
002    
003         import com.croftsoft.core.lang.NullArgumentException;
004         import com.croftsoft.core.security.Authentication;
005    
006         /*********************************************************************
007         * A request to talk.
008         *
009         * @version
010         *   2003-06-20
011         * @since
012         *   2003-06-11
013         * @author
014         *   <a href="https://www.croftsoft.com/">David Wallace Croft</a>
015         *********************************************************************/
016    
017         public final class  TalkRequest
018           extends CoalesceableRequest
019         //////////////////////////////////////////////////////////////////////
020         //////////////////////////////////////////////////////////////////////
021         {
022    
023         private static final long  serialVersionUID = 0L;
024    
025         //
026    
027         private final String  text;
028    
029         //////////////////////////////////////////////////////////////////////
030         //////////////////////////////////////////////////////////////////////
031    
032         public  TalkRequest (
033           Authentication  authentication,
034           String          text )
035         //////////////////////////////////////////////////////////////////////
036         {
037           super ( authentication );
038    
039           NullArgumentException.check ( this.text = text );
040         }
041    
042         //////////////////////////////////////////////////////////////////////
043         //////////////////////////////////////////////////////////////////////
044    
045         public String  getText ( ) { return text; }
046    
047         //////////////////////////////////////////////////////////////////////
048         //////////////////////////////////////////////////////////////////////
049    
050         public boolean  equals ( Object  other )
051         //////////////////////////////////////////////////////////////////////
052         {
053           if ( other == null )
054           {
055             return false;
056           }
057    
058           if ( other.getClass ( ) != TalkRequest.class )
059           {
060             return false;
061           }
062    
063           return true;
064         }
065    
066         //////////////////////////////////////////////////////////////////////
067         //////////////////////////////////////////////////////////////////////
068         }