com.ibm.websphere.fabric.da.types
Class Moment

java.lang.Object
  extended by com.ibm.websphere.fabric.types.Moment
      extended by com.ibm.websphere.fabric.da.types.Moment
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable

public final class Moment
extends Moment
implements java.lang.Comparable, java.io.Serializable

Represents a moment in time. Moments are comparable to one another, and independent of locale or timezone.

Instances of this type are immutable, and therefore thread-safe.

Version:
$Id: $
Author:
dranatunga
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.ibm.websphere.fabric.types.Moment
INFINITY
 
Constructor Summary
Moment()
          Creates an object representing the current moment.
Moment(long timeInMillis)
          Creates an object representing moment identified by supplied number of milliseconds elapsed since Midnight, January 1, 1970 UTC.
 
Method Summary
static Moment promote(Moment moment)
           
 
Methods inherited from class com.ibm.websphere.fabric.types.Moment
compareTo, equals, getTimeInMillis, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Constructor Detail

Moment

public Moment()
Creates an object representing the current moment. Note that this is limited to the accuracy and precision of the JVM clock exposed through System.currentTimeMillis().


Moment

public Moment(long timeInMillis)
Creates an object representing moment identified by supplied number of milliseconds elapsed since Midnight, January 1, 1970 UTC.

Method Detail

promote

public static Moment promote(Moment moment)


Copyright © 2002-2009 IBM. All Rights Reserved.