RTI Persistence Service Version 7.7.0

[$(NDDSHOME)/example/JAVA/helloWorldPersistence/HelloWorld.java]

/*
WARNING: THIS FILE IS AUTO-GENERATED. DO NOT MODIFY.
This file was generated from .idl
using RTI Code Generator (rtiddsgen) version 4.7.0.
The rtiddsgen tool is part of the RTI Connext DDS distribution.
For more information, type 'rtiddsgen -help' at a command shell
or consult the Code Generator User's Manual.
*/
import com.rti.dds.infrastructure.*;
import com.rti.dds.infrastructure.Copyable;
import java.io.Serializable;
import com.rti.dds.cdr.CdrHelper;
// Depending on the type represented in the IDL, we may perform some redundant
// casts, we are suppressing that warning
@SuppressWarnings("cast")
public class HelloWorld implements Copyable, Serializable{
private static final long serialVersionUID = -1545509471L;
public int data = (int)0;
public HelloWorld() {
}
public HelloWorld (HelloWorld other) {
this();
copy_from(other);
}
public static java.lang.Object create() {
HelloWorld self;
self = new HelloWorld();
self.clear();
return self;
}
public void clear() {
data = (int)0;
}
@Override
public boolean equals(java.lang.Object o) {
if (o == null) {
return false;
}
if(getClass() != o.getClass()) {
return false;
}
HelloWorld otherObj = (HelloWorld)o;
if(this.data != otherObj.data) {
return false;
}
return true;
}
@Override
public int hashCode() {
final int __prime = 31;
int __result = 1;
__result = __prime * __result + (int)data;
return __result;
}
public java.lang.Object copy_from(java.lang.Object src) {
HelloWorld typedSrc = (HelloWorld) src;
HelloWorld typedDst = this;
typedDst.data = typedSrc.data;
return this;
}
@Override
public java.lang.String toString(){
return toString("", 0);
}
public java.lang.String toString(java.lang.String desc, int indent) {
java.lang.StringBuffer strBuffer = new java.lang.StringBuffer();
if (desc != null) {
CdrHelper.printIndent(strBuffer, indent);
strBuffer.append(desc).append(":\n");
}
CdrHelper.printIndent(strBuffer, indent+1);
strBuffer.append("data: ").append(this.data).append("\n");
return strBuffer.toString();
}
}