com.crystaldecisions.reports.common.value
Class TimeValue

java.lang.Object
  extended by CrystalValue
      extended by com.crystaldecisions.reports.common.value.FormulaValue
          extended by com.crystaldecisions.reports.common.value.TimeValue
All Implemented Interfaces:
java.lang.Comparable

public class TimeValue
extends FormulaValue
implements java.lang.Comparable


Field Summary
static int hoursPerDay
           
static TimeValue max
           
static long maxTimeInNs
           
static TimeValue maxTimeValueInSeconds
           The maximum TimeValue = t(23:59:59)
static int millisecondsPerSecond
           The number of milliseconds per second is 1000.
static TimeValue min
           
static long minTimeInNs
           
static int minutesPerHour
           
static long nanosecondsPerDay
           
static long nanosecondsPerHour
           
static int nanosecondsPerMillisecond
           The number of nanoseconds per millisecond is 1000000.
static long nanosecondsPerMinute
           
static long nanosecondsPerSecond
           
static int nullCRTime
           
static int secondsPerDay
           
static int secondsPerMinute
           
 
Method Summary
 TimeValue addNumberToTime(double nSeconds)
           
 FormulaValue coerceToDateTime()
           
 FormulaValue coerceToTime()
           
 int compareTo(java.lang.Object obj)
           
 int compareTo(java.lang.Object obj, java.util.Comparator stringComparator)
           
 boolean equals(java.lang.Object obj, boolean caseInsensitive)
           
static TimeValue From1900Format(double inputTime)
           
static TimeValue fromCalendar(java.util.Calendar calendar)
           
static TimeValue fromCRTime(int CRTime)
           
static TimeValue fromHMS(int hours, int minutes, double seconds)
           
static TimeValue fromHMSN(int hours, int minutes, int seconds, long nanoseconds)
           
static TimeValue fromOleDate(double OleDate)
           
static TimeValue fromTimeInNs(long timeInNs)
           
 int getCRTime()
           
static int getCRTime(TimeValue time)
           
 int getEncodedSize(ValueType type)
           
 int getEncodedSizeForArchive(ValueType type)
           
 int getHours()
           
static int getHours(TimeValue time)
           
 java.util.Date getJavaDate()
           
static int GetMaxEncodedSize()
           
 double getMilliseconds()
           
 int getMinutes()
           
static int getMinutes(TimeValue time)
           
 long getNanoseconds()
           
static long getNanoseconds(TimeValue time)
           
 double getOleDate()
           
 double getSeconds()
           
 long getTimeInNs()
           
 ValueType getValueType()
           
 int getWholeMilliseconds()
           
 int getWholeSeconds()
           
static int getWholeSeconds(TimeValue time)
           
 int hashCode(boolean caseInsensitive)
           
static TimeValue Load(java.io.DataInput in)
           
static TimeValue LoadFromArchive(IInputArchive ar)
           
static long NormalizeTimeInNs(long timeInNs)
           
static TimeValue now()
           
 void store(ValueType type, ExtendedDataOutput out)
           
 void storeToArchive(ValueType type, IOutputArchive ar)
           
static double To1900Format(TimeValue time)
           
 java.lang.String toString()
           
 
Methods inherited from class com.crystaldecisions.reports.common.value.FormulaValue
coerce, coerceToArray, coerceToArray, coerceToBoolean, coerceToBoolean, coerceToCurrency, coerceToCurrency, coerceToDate, coerceToDate, coerceToDateTime, coerceToNumber, coerceToNumber, coerceToRange, coerceToRange, coerceToRangeArray, coerceToRangeArray, coerceToString, coerceToString, coerceToTime, getFormulaValueType, Load, LoadFromArchive, makeZeroValue
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

nullCRTime

public static final int nullCRTime
See Also:
Constant Field Values

hoursPerDay

public static final int hoursPerDay
See Also:
Constant Field Values

minutesPerHour

public static final int minutesPerHour
See Also:
Constant Field Values

secondsPerMinute

public static final int secondsPerMinute
See Also:
Constant Field Values

secondsPerDay

public static final int secondsPerDay
See Also:
Constant Field Values

millisecondsPerSecond

public static final int millisecondsPerSecond

The number of milliseconds per second is 1000.

See Also:
Constant Field Values

nanosecondsPerMillisecond

public static final int nanosecondsPerMillisecond

The number of nanoseconds per millisecond is 1000000.

See Also:
Constant Field Values

nanosecondsPerSecond

public static final long nanosecondsPerSecond
See Also:
Constant Field Values

nanosecondsPerMinute

public static final long nanosecondsPerMinute
See Also:
Constant Field Values

nanosecondsPerHour

public static final long nanosecondsPerHour
See Also:
Constant Field Values

nanosecondsPerDay

public static final long nanosecondsPerDay
See Also:
Constant Field Values

minTimeInNs

public static final long minTimeInNs
See Also:
Constant Field Values

maxTimeInNs

public static final long maxTimeInNs
See Also:
Constant Field Values

min

public static final TimeValue min

max

public static final TimeValue max

maxTimeValueInSeconds

public static final TimeValue maxTimeValueInSeconds

The maximum TimeValue = t(23:59:59)

Method Detail

store

public void store(ValueType type,
                  ExtendedDataOutput out)
           throws java.io.IOException
Throws:
java.io.IOException

storeToArchive

public void storeToArchive(ValueType type,
                           IOutputArchive ar)
                    throws ArchiveException
Throws:
ArchiveException

Load

public static TimeValue Load(java.io.DataInput in)
                      throws java.io.IOException
Throws:
java.io.IOException

LoadFromArchive

public static TimeValue LoadFromArchive(IInputArchive ar)
                                 throws ArchiveException
Throws:
ArchiveException

GetMaxEncodedSize

public static int GetMaxEncodedSize()

getEncodedSizeForArchive

public int getEncodedSizeForArchive(ValueType type)

getEncodedSize

public int getEncodedSize(ValueType type)

NormalizeTimeInNs

public static long NormalizeTimeInNs(long timeInNs)

now

public static TimeValue now()

fromTimeInNs

public static TimeValue fromTimeInNs(long timeInNs)

fromCRTime

public static TimeValue fromCRTime(int CRTime)

fromOleDate

public static TimeValue fromOleDate(double OleDate)

getOleDate

public double getOleDate()

fromHMSN

public static TimeValue fromHMSN(int hours,
                                 int minutes,
                                 int seconds,
                                 long nanoseconds)

fromHMS

public static TimeValue fromHMS(int hours,
                                int minutes,
                                double seconds)

fromCalendar

public static TimeValue fromCalendar(java.util.Calendar calendar)

getTimeInNs

public long getTimeInNs()

getCRTime

public static int getCRTime(TimeValue time)

getHours

public static int getHours(TimeValue time)

getMinutes

public static int getMinutes(TimeValue time)

getWholeSeconds

public static int getWholeSeconds(TimeValue time)

getNanoseconds

public static long getNanoseconds(TimeValue time)

getCRTime

public int getCRTime()

getHours

public int getHours()

getMinutes

public int getMinutes()

getWholeSeconds

public int getWholeSeconds()

getSeconds

public double getSeconds()

getNanoseconds

public long getNanoseconds()

getMilliseconds

public double getMilliseconds()

getWholeMilliseconds

public int getWholeMilliseconds()

getValueType

public ValueType getValueType()

coerceToTime

public FormulaValue coerceToTime()
Overrides:
coerceToTime in class FormulaValue

coerceToDateTime

public FormulaValue coerceToDateTime()
Overrides:
coerceToDateTime in class FormulaValue

equals

public boolean equals(java.lang.Object obj,
                      boolean caseInsensitive)

compareTo

public int compareTo(java.lang.Object obj,
                     java.util.Comparator stringComparator)

hashCode

public int hashCode(boolean caseInsensitive)

compareTo

public int compareTo(java.lang.Object obj)
Specified by:
compareTo in interface java.lang.Comparable

addNumberToTime

public TimeValue addNumberToTime(double nSeconds)

toString

public java.lang.String toString()

To1900Format

public static double To1900Format(TimeValue time)

From1900Format

public static TimeValue From1900Format(double inputTime)

getJavaDate

public java.util.Date getJavaDate()