Cumulus4j API
(1.0.0)

org.cumulus4j.keymanager.cli
Enum TimePeriodOptionHandler.Unit

java.lang.Object
  extended by java.lang.Enum<TimePeriodOptionHandler.Unit>
      extended by org.cumulus4j.keymanager.cli.TimePeriodOptionHandler.Unit
All Implemented Interfaces:
Serializable, Comparable<TimePeriodOptionHandler.Unit>
Enclosing class:
TimePeriodOptionHandler

public static enum TimePeriodOptionHandler.Unit
extends Enum<TimePeriodOptionHandler.Unit>

Units based on ISO 31-1 (where it exists).

Author:
Marco หงุ่ยตระกูล-Schulze - marco at nightlabs dot de

Enum Constant Summary
a
          Year.
d
          Day.
h
          Hour.
min
          Minute.
ms
          Millisecond.
s
          Second.
y
          Year (alternative for convenience).
 
Method Summary
static String getAllUnitsWithDisplayName()
           
static String getAllUnitsWithDisplayName(String separator)
           
static String getAllUnitsWithDisplayName(String unitFormat, String separator)
           
 String getDisplayName()
           
 long toMSec(long value)
           
static TimePeriodOptionHandler.Unit valueOf(String name)
          Returns the enum constant of this type with the specified name.
static TimePeriodOptionHandler.Unit[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

ms

public static final TimePeriodOptionHandler.Unit ms
Millisecond.


s

public static final TimePeriodOptionHandler.Unit s
Second.


min

public static final TimePeriodOptionHandler.Unit min
Minute.


h

public static final TimePeriodOptionHandler.Unit h
Hour.


d

public static final TimePeriodOptionHandler.Unit d
Day.


a

public static final TimePeriodOptionHandler.Unit a
Year. Abbreviation from latin "annus".


y

public static final TimePeriodOptionHandler.Unit y
Year (alternative for convenience).

Method Detail

values

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

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

valueOf

public static TimePeriodOptionHandler.Unit valueOf(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:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

toMSec

public long toMSec(long value)

getDisplayName

public String getDisplayName()

getAllUnitsWithDisplayName

public static String getAllUnitsWithDisplayName()

getAllUnitsWithDisplayName

public static String getAllUnitsWithDisplayName(String separator)

getAllUnitsWithDisplayName

public static String getAllUnitsWithDisplayName(String unitFormat,
                                                String separator)

Cumulus4j API
(1.0.0)

Copyright © 2012 NightLabs Consulting GmbH. All Rights Reserved.