org.fudgemsg.types
Enum DateTimeAccuracy

java.lang.Object
  extended by java.lang.Enum<DateTimeAccuracy>
      extended by org.fudgemsg.types.DateTimeAccuracy
All Implemented Interfaces:
Serializable, Comparable<DateTimeAccuracy>

public enum DateTimeAccuracy
extends Enum<DateTimeAccuracy>

Granularity options for DateTimeFieldType and TimeFieldType.


Enum Constant Summary
CENTURY
          Century precision.
DAY
          Day precision.
HOUR
          Hour precision.
MICROSECOND
          Microsecond precision.
MILLENIUM
          Millenia precision.
MILLISECOND
          Millisecond precision.
MINUTE
          Minute precision.
MONTH
          Month precision.
NANOSECOND
          Nanosecond precision.
SECOND
          Second precision.
YEAR
          Year precision.
 
Method Summary
 boolean greaterThan(DateTimeAccuracy accuracy)
          Tests if this accuracy is a greater precision than another.
 boolean lessThan(DateTimeAccuracy accuracy)
          Tests is this accuracy is a lower precision than another.
static DateTimeAccuracy valueOf(String name)
          Returns the enum constant of this type with the specified name.
static DateTimeAccuracy[] 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

MILLENIUM

public static final DateTimeAccuracy MILLENIUM
Millenia precision.


CENTURY

public static final DateTimeAccuracy CENTURY
Century precision.


YEAR

public static final DateTimeAccuracy YEAR
Year precision.


MONTH

public static final DateTimeAccuracy MONTH
Month precision.


DAY

public static final DateTimeAccuracy DAY
Day precision.


HOUR

public static final DateTimeAccuracy HOUR
Hour precision.


MINUTE

public static final DateTimeAccuracy MINUTE
Minute precision.


SECOND

public static final DateTimeAccuracy SECOND
Second precision.


MILLISECOND

public static final DateTimeAccuracy MILLISECOND
Millisecond precision.


MICROSECOND

public static final DateTimeAccuracy MICROSECOND
Microsecond precision.


NANOSECOND

public static final DateTimeAccuracy NANOSECOND
Nanosecond precision.

Method Detail

values

public static DateTimeAccuracy[] 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 (DateTimeAccuracy c : DateTimeAccuracy.values())
    System.out.println(c);

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

valueOf

public static DateTimeAccuracy 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

greaterThan

public boolean greaterThan(DateTimeAccuracy accuracy)
Tests if this accuracy is a greater precision than another. E.g. SECOND precision is greater than MINUTE precision.

Parameters:
accuracy - other accuracy
Returns:
true if greater, false otherwise

lessThan

public boolean lessThan(DateTimeAccuracy accuracy)
Tests is this accuracy is a lower precision than another. E.g. MINUTE precision is less than SECOND precision.

Parameters:
accuracy - other accuracy
Returns:
true if lower, false otherwise.


Copyright 2009-Present by OpenGamma Inc. and individual contributors
Released under the Apache License, Version 2.0