OpenSplice Java 5 DCPS  v6.x
OpenSplice Java 5 OpenSplice Data Distribution Service Data-Centric Publish-Subscribe API
org.opensplice.dds.core.DurationImpl Class Reference
Inheritance diagram for org.opensplice.dds.core.DurationImpl:
Inheritance graph
Collaboration diagram for org.opensplice.dds.core.DurationImpl:
Collaboration graph

Public Member Functions

 DurationImpl (OsplServiceEnvironment environment, long duration, TimeUnit unit)
 
 DurationImpl (OsplServiceEnvironment environment, long seconds, long nanoseconds)
 
Duration add (Duration duration)
 
Duration add (long duration, TimeUnit unit)
 
int compareTo (Duration o)
 
DDS.Duration_t convert ()
 
boolean equals (Object other)
 
long getDuration (TimeUnit inThisUnit)
 
ServiceEnvironment getEnvironment ()
 
long getRemainder (TimeUnit primaryUnit, TimeUnit remainderUnit)
 
int hashCode ()
 
boolean isInfinite ()
 
boolean isZero ()
 
DurationImpl normalize ()
 
Duration subtract (Duration duration)
 
Duration subtract (long duration, TimeUnit unit)
 
String toString ()
 

Static Public Member Functions

static Duration infiniteDuration (ServiceEnvironment env)
 
static Duration newDuration (long duration, TimeUnit unit, ServiceEnvironment env)
 Construct a time duration of the given magnitude. More...
 
static Duration zeroDuration (ServiceEnvironment env)
 

Static Public Attributes

static final int INFINITE_NANOSECONDS = DDS.DURATION_INFINITE_NSEC.value
 
static final int INFINITE_SECONDS = DDS.DURATION_INFINITE_SEC.value
 

Detailed Description

Definition at line 28 of file DurationImpl.java.

Constructor & Destructor Documentation

◆ DurationImpl() [1/2]

org.opensplice.dds.core.DurationImpl.DurationImpl ( OsplServiceEnvironment  environment,
long  duration,
TimeUnit  unit 
)

Definition at line 37 of file DurationImpl.java.

◆ DurationImpl() [2/2]

org.opensplice.dds.core.DurationImpl.DurationImpl ( OsplServiceEnvironment  environment,
long  seconds,
long  nanoseconds 
)

Definition at line 59 of file DurationImpl.java.

Member Function Documentation

◆ add() [1/2]

Duration org.opensplice.dds.core.DurationImpl.add ( Duration  duration)

Definition at line 178 of file DurationImpl.java.

◆ add() [2/2]

Duration org.opensplice.dds.core.DurationImpl.add ( long  duration,
TimeUnit  unit 
)

Definition at line 232 of file DurationImpl.java.

◆ compareTo()

int org.opensplice.dds.core.DurationImpl.compareTo ( Duration  o)

Definition at line 96 of file DurationImpl.java.

◆ convert()

DDS.Duration_t org.opensplice.dds.core.DurationImpl.convert ( )

Definition at line 314 of file DurationImpl.java.

◆ equals()

boolean org.opensplice.dds.core.DurationImpl.equals ( Object  other)

Definition at line 319 of file DurationImpl.java.

◆ getDuration()

long org.opensplice.dds.core.DurationImpl.getDuration ( TimeUnit  inThisUnit)

Definition at line 134 of file DurationImpl.java.

◆ getEnvironment()

ServiceEnvironment org.opensplice.dds.core.DurationImpl.getEnvironment ( )
Returns
the org.omg.dds.core.ServiceEnvironment object that directly or indirectly was used to create this object.

Implements org.omg.dds.core.DDSObject.

Definition at line 129 of file DurationImpl.java.

◆ getRemainder()

long org.opensplice.dds.core.DurationImpl.getRemainder ( TimeUnit  primaryUnit,
TimeUnit  remainderUnit 
)

Definition at line 146 of file DurationImpl.java.

◆ hashCode()

int org.opensplice.dds.core.DurationImpl.hashCode ( )

Definition at line 332 of file DurationImpl.java.

◆ infiniteDuration()

static Duration org.omg.dds.core.Duration.infiniteDuration ( ServiceEnvironment  env)
staticinherited
Parameters
envIdentifies the Service instance to which the object will belong.
Returns
An unmodifiable org.omg.dds.core.Duration of infinite length.

Definition at line 81 of file Duration.java.

◆ isInfinite()

boolean org.opensplice.dds.core.DurationImpl.isInfinite ( )

Definition at line 172 of file DurationImpl.java.

◆ isZero()

boolean org.opensplice.dds.core.DurationImpl.isZero ( )

Definition at line 167 of file DurationImpl.java.

◆ newDuration()

static Duration org.omg.dds.core.Duration.newDuration ( long  duration,
TimeUnit  unit,
ServiceEnvironment  env 
)
staticinherited

Construct a time duration of the given magnitude.

A duration of magnitude Long#MAX_VALUE indicates an infinite duration, regardless of the units specified.

Parameters
envIdentifies the Service instance to which the new object will belong.
See also
isInfinite()
infiniteDuration(ServiceEnvironment)

Definition at line 62 of file Duration.java.

◆ normalize()

DurationImpl org.opensplice.dds.core.DurationImpl.normalize ( )

Definition at line 75 of file DurationImpl.java.

◆ subtract() [1/2]

Duration org.opensplice.dds.core.DurationImpl.subtract ( Duration  duration)

Definition at line 240 of file DurationImpl.java.

◆ subtract() [2/2]

Duration org.opensplice.dds.core.DurationImpl.subtract ( long  duration,
TimeUnit  unit 
)

Definition at line 307 of file DurationImpl.java.

◆ toString()

String org.opensplice.dds.core.DurationImpl.toString ( )

Definition at line 337 of file DurationImpl.java.

◆ zeroDuration()

static Duration org.omg.dds.core.Duration.zeroDuration ( ServiceEnvironment  env)
staticinherited
Parameters
envIdentifies the Service instance to which the object will belong.
Returns
A org.omg.dds.core.Duration of zero length.

Definition at line 97 of file Duration.java.

Member Data Documentation

◆ INFINITE_NANOSECONDS

final int org.opensplice.dds.core.DurationImpl.INFINITE_NANOSECONDS = DDS.DURATION_INFINITE_NSEC.value
static

Definition at line 35 of file DurationImpl.java.

◆ INFINITE_SECONDS

final int org.opensplice.dds.core.DurationImpl.INFINITE_SECONDS = DDS.DURATION_INFINITE_SEC.value
static

Definition at line 34 of file DurationImpl.java.


The documentation for this class was generated from the following file: