net.sourceforge.jsdp.util
Class TypedTime

java.lang.Object
  extended by net.sourceforge.jsdp.util.TypedTime
All Implemented Interfaces:
Serializable

public class TypedTime
extends Object
implements Serializable

Handles typed time representation used in SDP.

Since:
0.1.0
Version:
1.0
Author:
Claudio Di Vita
See Also:
Serialized Form

Field Summary
static String DAYS
          The days multiplier
static String HOURS
          The hours multiplier
static String MINUTES
          The minutes multiplier
static String SECONDS
          The seconds multiplier
 
Constructor Summary
TypedTime()
           
 
Method Summary
static long getTime(String input)
          Returns the long value of a typed time.
static String toString(long time)
          Returns a typed representation of a time value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DAYS

public static final String DAYS
The days multiplier

See Also:
Constant Field Values

HOURS

public static final String HOURS
The hours multiplier

See Also:
Constant Field Values

MINUTES

public static final String MINUTES
The minutes multiplier

See Also:
Constant Field Values

SECONDS

public static final String SECONDS
The seconds multiplier

See Also:
Constant Field Values
Constructor Detail

TypedTime

public TypedTime()
Method Detail

getTime

public static long getTime(String input)
                    throws SDPException
Returns the long value of a typed time.

Parameters:
input - the typed time
Returns:
a long value
Throws:
SDPException - if an unknown multiplier is contained in the input string

toString

public static String toString(long time)
Returns a typed representation of a time value.

Parameters:
time - the value to represent
Returns:
a String


Copyright © 2004-2008. All Rights Reserved.