pulse - the web application framework Get pulse at SourceForge.net. Fast, secure and Free Open Source software downloads Ohloh project report for pulse-java

org.torweg.pulse.util.time
Enum TimeSpan.TimeConstant

java.lang.Object
  extended by java.lang.Enum<TimeSpan.TimeConstant>
      extended by org.torweg.pulse.util.time.TimeSpan.TimeConstant
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<TimeSpan.TimeConstant>
Enclosing class:
TimeSpan

public static enum TimeSpan.TimeConstant
extends java.lang.Enum<TimeSpan.TimeConstant>

the time constants.


Enum Constant Summary
DAY
          the day.
HOUR
          the hour.
MINUTE
          the minute.
SECOND
          the second.
WEEK
          the week.
YEAR
          the year.
 
Method Summary
 char getCharacter()
           
 long getScalar()
           
static TimeSpan.TimeConstant valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static TimeSpan.TimeConstant[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

SECOND

public static final TimeSpan.TimeConstant SECOND
the second.


MINUTE

public static final TimeSpan.TimeConstant MINUTE
the minute.


HOUR

public static final TimeSpan.TimeConstant HOUR
the hour.


DAY

public static final TimeSpan.TimeConstant DAY
the day.


WEEK

public static final TimeSpan.TimeConstant WEEK
the week.


YEAR

public static final TimeSpan.TimeConstant YEAR
the year.

Method Detail

values

public static final TimeSpan.TimeConstant[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(TimeSpan.TimeConstant c : TimeSpan.TimeConstant.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static TimeSpan.TimeConstant valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name

getCharacter

public char getCharacter()
Returns:
Returns the character.

getScalar

public long getScalar()
Returns:
Returns the scalar.