RTI Connext Java API  Version 5.3.1
 All Classes Namespaces Functions Variables Groups Pages
Copyable Interface Reference

<<extension>> <<interface>> Interface for all the user-defined data type classes that support copy. More...

Inheritance diagram for Copyable:
SampleData< T > DynamicData GUID_t InstanceHandle_t StringSeq Time_t WriteParams_t ReadConditionParams SampleInfo TopicQueryData TopicQuerySelection BuiltinTopicKey_t Bytes BytesSeq KeyedBytes KeyedBytesSeq KeyedString KeyedStringSeq AbstractPrimitiveSequence Enum Foo FooSeq

Public Member Functions

Object copy_from (Object src)
 Copy value of a data type from source.
 

Detailed Description

<<extension>> <<interface>> Interface for all the user-defined data type classes that support copy.

A class implements the com.rti.dds.infrastructure.Copyable interface to indicate that it allows its entire state to be replaced with the state of another object. This state copy is a deep copy, such that subsequent changes to any part of one object will not be observed in the other.

Therefore, in general, object references in this object cannot simply be reassigned to those in the source object. (Strings are an exception to this rule, because they are immutable.)

Member Function Documentation

Object copy_from ( Object  src)

Copy value of a data type from source.

Copy data into this object from another. This copy is intended to be a deep copy, so that all data members (recursively) are copied (not just resetting Object references).

This operation returns the object that is copied if copy is successful.

Parameters
src<<in>> The Object which contains the data to be copied.
Returns
Generally, return this but special cases (such as Enum) exist.
Exceptions
NullPointerExceptionIf src is null.
ClassCastExceptionIf src is not the same type as this.

RTI Connext Java API Version 5.3.1 Copyright © Mon Feb 19 2018 Real-Time Innovations, Inc