
/*
  WARNING: THIS FILE IS AUTO-GENERATED. DO NOT MODIFY.

  This file was generated from .idl using "rtiddsgen".
  The rtiddsgen tool is part of the RTI Connext distribution.
  For more information, type 'rtiddsgen -help' at a command shell
  or consult the RTI Connext manual.
*/
    
package TelebotDDSCore.Source.Java.Generated.master.voice;
        

import com.rti.dds.infrastructure.*;
import com.rti.dds.infrastructure.Copyable;

import java.io.Serializable;
import com.rti.dds.cdr.CdrHelper;


public class TMasterToSlaveVoice implements Copyable, Serializable
{

    public String voiceCommand = ""; /* maximum length = (255) */


    public TMasterToSlaveVoice() {

    }


    public TMasterToSlaveVoice(TMasterToSlaveVoice other) {

        this();
        copy_from(other);
    }



    public static Object create() {
        TMasterToSlaveVoice self;
        self = new TMasterToSlaveVoice();
         
        self.clear();
        
        return self;
    }

    public void clear() {
        
        voiceCommand = "";
            
    }

    public boolean equals(Object o) {
                
        if (o == null) {
            return false;
        }        
        
        

        if(getClass() != o.getClass()) {
            return false;
        }

        TMasterToSlaveVoice otherObj = (TMasterToSlaveVoice)o;



        if(!voiceCommand.equals(otherObj.voiceCommand)) {
            return false;
        }
            
        return true;
    }

    public int hashCode() {
        int __result = 0;

        __result += voiceCommand.hashCode();
                
        return __result;
    }
    

    /**
     * This is the implementation of the <code>Copyable</code> interface.
     * This method will perform a deep copy of <code>src</code>
     * This method could be placed into <code>TMasterToSlaveVoiceTypeSupport</code>
     * rather than here by using the <code>-noCopyable</code> option
     * to rtiddsgen.
     * 
     * @param src The Object which contains the data to be copied.
     * @return Returns <code>this</code>.
     * @exception NullPointerException If <code>src</code> is null.
     * @exception ClassCastException If <code>src</code> is not the 
     * same type as <code>this</code>.
     * @see com.rti.dds.infrastructure.Copyable#copy_from(java.lang.Object)
     */
    public Object copy_from(Object src) {
        

        TMasterToSlaveVoice typedSrc = (TMasterToSlaveVoice) src;
        TMasterToSlaveVoice typedDst = this;

        typedDst.voiceCommand = typedSrc.voiceCommand;
            
        return this;
    }


    
    public String toString(){
        return toString("", 0);
    }
        
    
    public String toString(String desc, int indent) {
        StringBuffer strBuffer = new StringBuffer();        
                        
        
        if (desc != null) {
            CdrHelper.printIndent(strBuffer, indent);
            strBuffer.append(desc).append(":\n");
        }
        
        
        CdrHelper.printIndent(strBuffer, indent+1);            
        strBuffer.append("voiceCommand: ").append(voiceCommand).append("\n");
            
        return strBuffer.toString();
    }
    
}

