com.isti.util
Class ValueTimeUtilFns

java.lang.Object
  extended bycom.isti.util.ValueTimeUtilFns
Direct Known Subclasses:
ValueTimeBlock

public class ValueTimeUtilFns
extends java.lang.Object


Field Summary
protected static java.lang.Class[] constructorParameterTypes
          The constructor parameter types.
static java.lang.String DATA_SEPARATOR
          The data ¬separator
protected static boolean gmtFlag
          The GMT flag (true for GMT time zone, false for local time zone.)
 
Constructor Summary
protected ValueTimeUtilFns()
           
 
Method Summary
protected static java.lang.Object getComponentForClass(java.lang.String className, java.lang.String dataTxt)
          Creates a new instance of the class represented by the class or interface with the given string name.
protected static java.lang.reflect.Constructor getConstructorForClass(java.lang.String className)
          Gets the constructor for the class represented by the class or interface with the given string name.
static long getCurrentTime()
          Get the current time value.
static long getCurrentTimestamp()
          Get the current time stamp.
static long getTime(long timestamp)
          Gets the time for the specified timestamp.
static long getTimestamp(long millis)
          Get the time stamp for the specified time value.
static java.lang.String getTimestampText(long timestamp)
          Returns a string representation of the specified timestamp.
static java.lang.String getTimestampText(long timestamp, boolean gmtFlag)
          Returns a string representation of the specified timestamp.
static java.lang.String getTimeText(long millis)
          Returns a string representation of the specified time value.
static java.lang.String getTimeText(long millis, boolean gmtFlag)
          Returns a string representation of the specified time value.
protected static ValueTimeBlock getValueTimeBlock(java.lang.String dataStr)
          Gets the value time block for the specified data string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DATA_SEPARATOR

public static final java.lang.String DATA_SEPARATOR
The data ¬separator

See Also:
Constant Field Values

constructorParameterTypes

protected static final java.lang.Class[] constructorParameterTypes
The constructor parameter types.


gmtFlag

protected static final boolean gmtFlag
The GMT flag (true for GMT time zone, false for local time zone.)

See Also:
Constant Field Values
Constructor Detail

ValueTimeUtilFns

protected ValueTimeUtilFns()
Method Detail

getCurrentTime

public static final long getCurrentTime()
Get the current time value.

Returns:
the number of milliseconds since January 1, 1970, 00:00:00 GMT.

getCurrentTimestamp

public static final long getCurrentTimestamp()
Get the current time stamp.

Returns:
the number of seconds since January 1, 1970, 00:00:00 GMT.

getTime

public static final long getTime(long timestamp)
Gets the time for the specified timestamp.

Parameters:
timestamp - the timestamp (seconds since January 1, 1970, 00:00:00 GMT.)
Returns:
the milliseconds since January 1, 1970, 00:00:00 GMT.

getTimestamp

public static final long getTimestamp(long millis)
Get the time stamp for the specified time value.

Parameters:
millis - the milliseconds since January 1, 1970, 00:00:00 GMT.
Returns:
the number of seconds since January 1, 1970, 00:00:00 GMT.

getTimestampText

public static final java.lang.String getTimestampText(long timestamp)
Returns a string representation of the specified timestamp.

Parameters:
timestamp - the timestamp (seconds since January 1, 1970, 00:00:00 GMT.)
Returns:
a string representation of the specified timestamp.

getTimestampText

public static final java.lang.String getTimestampText(long timestamp,
                                                      boolean gmtFlag)
Returns a string representation of the specified timestamp.

Parameters:
timestamp - the timestamp (seconds since January 1, 1970, 00:00:00 GMT.)
gmtFlag - true for GMT time zone, false for local time zone.
Returns:
a string representation of the specified timestamp.

getTimeText

public static final java.lang.String getTimeText(long millis)
Returns a string representation of the specified time value.

Parameters:
millis - the milliseconds since January 1, 1970, 00:00:00 GMT.
Returns:
a string representation of the specified timestamp.

getTimeText

public static final java.lang.String getTimeText(long millis,
                                                 boolean gmtFlag)
Returns a string representation of the specified time value.

Parameters:
millis - the milliseconds since January 1, 1970, 00:00:00 GMT.
gmtFlag - true for GMT time zone, false for local time zone.
Returns:
a string representation of the specified timestamp.

getConstructorForClass

protected static final java.lang.reflect.Constructor getConstructorForClass(java.lang.String className)
Gets the constructor for the class represented by the class or interface with the given string name.

Parameters:
className - the fully qualified name of the desired class.
Returns:
the constructor or null if not found.

getComponentForClass

protected static final java.lang.Object getComponentForClass(java.lang.String className,
                                                             java.lang.String dataTxt)
Creates a new instance of the class represented by the class or interface with the given string name. The class is instantiatied as if by a new expression with an empty argument list. The class is initialized if it has not already been initialized.

Parameters:
className - the fully qualified name of the desired class.
dataTxt - the text representation of the data.
Returns:
a newly allocated instance of the class represented by this object or the data string if the class could not be instantiated.

getValueTimeBlock

protected static final ValueTimeBlock getValueTimeBlock(java.lang.String dataStr)
Gets the value time block for the specified data string.

Parameters:
dataStr - the data string.
Returns:
the value time block.