RTI Connext Java API  Version 5.0.0
Enum Class Reference

A superclass for all type-safe enumerated types. More...

Inheritance diagram for Enum:
Copyable DataWriterResourceLimitsInstanceReplacementKind DestinationOrderQosPolicyKind DiscoveryPluginPromiscuityKind DurabilityQosPolicyKind HistoryQosPolicyKind LivelinessQosPolicyKind OwnershipQosPolicyKind PresentationQosPolicyAccessScopeKind PublishModeQosPolicyKind QosPolicyId_t RefilterQosPolicyKind ReliabilityQosPolicyAcknowledgmentModeKind ReliabilityQosPolicyKind RemoteParticipantPurgeKind ThreadSettingsCpuRotationKind TransportMulticastQosPolicyKind TypeConsistencyKind WireProtocolQosPolicyAutoKind FlowControllerSchedulingPolicy SampleLostStatusKind SampleRejectedStatusKind ExtensibilityKind TCKind LogCategory LogLevel LogPrintFormat LogVerbosity

Public Member Functions

final int ordinal ()
 The integral value of this enumerated constant.
 
Object copy_from (Object src)
 
final String name ()
 The name of this enum constant, as declared in the enum declaration.
 
final String toString ()
 The string value of this enum constant.
 
- Public Member Functions inherited from Copyable
Object copy_from (Object src)
 Copy value of a data type from source.
 

Protected Member Functions

 Enum (String name, int ordinal)
 The constructor.
 

Detailed Description

A superclass for all type-safe enumerated types.

This class is not part of the DDS specification per se. It has been introduced to facilitate the implementation of the numerous enumerated types in the specification and is based on the Java enumeration JSR. See http://www.jcp.org/aboutJava/communityprocess/jsr/tiger/enum.html.

Constructor & Destructor Documentation

Enum ( String  name,
int  ordinal 
)
protected

The constructor.

Parameters
ordinalThe value of the ordinal field of the new enumerated constant.
nameThe value of the name field of the new enumerated constant.
See Also
com.rti.dds.util.Enum.ordinal
com.rti.dds.util.Enum.name

Member Function Documentation

final int ordinal ( )

The integral value of this enumerated constant.

For example, in an IDL definition like this:

enum Foo {
BAR = 2
};

...the value of Foo.BAR.ordinal() will be 2. If the assignment ("<code>= 2</code>") is omitted, the ordinal value will be 0.

Object copy_from ( Object  src)

This is the implementation of the Copyable interface. While this implementation is not strictly a copy it can have the same effect. In order to use it properly, assign the result of the operation to the member that is the target of the copy. So, for example: myEnumField = myEnumField.copy_from(anotherInstanceOfEnum); Since Enums are immutable there cannot be a true copy made but this method will return a reference to the same enumerate as anotherInstanceOfEnum.

Returns
returns src
See Also
com.rti.dds.infrastructure.Copyable::copy_from(java.lang.Object)
final String name ( )

The name of this enum constant, as declared in the enum declaration.

Most programmers should use the com.rti.dds.util.Enum.toString method rather than accessing this field.

final String toString ( )

The string value of this enum constant.

See Also
com.rti.dds.util.Enum.name
Returns
the name of this enum constant

RTI Connext Java API Version 5.0.0 Copyright © Thu Aug 30 2012 Real-Time Innovations, Inc