RTI Connext Java API Version 7.1.0

<<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. More...

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

◆ copy_from()

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.

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

Implemented in SampleInfo, DynamicData, GUID_t, InstanceHandle_t, StringSeq, Time_t, WriteParams_t, QueryConditionParams, ReadConditionParams, TopicQueryData, TopicQuerySelection, BuiltinTopicKey_t, Bytes, BytesSeq, KeyedBytes, KeyedBytesSeq, KeyedString, KeyedStringSeq, AbstractPrimitiveSequence, Enum, Foo, and FooSeq.