com.holonplatform.core.temporal

## Enum TemporalType

- java.lang.Object
- - java.lang.Enum<TemporalType>
  - - com.holonplatform.core.temporal.TemporalType

- All Implemented Interfaces:
    Serializable, Comparable<TemporalType>

      public enum TemporalType
      extends Enum<TemporalType>

  Enumeration of temporal macro-types.
  Since:
    5.0.0

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant and Description
    `DATE` Temporal representing only a date
    `DATE_TIME` Temporal representing a date and time
    `TIME` Temporal representing only a time

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static Optional<TemporalType>` | `getTemporalType(Class<?> type)` Get the temporal macro-type of given `type`, if it is well-known temporal type.
    `static Optional<TemporalType>` | `getTemporalType(Temporal temporal)` Get the temporal macro-type of given `temporal` instance, if available.
    `static TemporalType` | `valueOf(String name)` Returns the enum constant of this type with the specified name.
    `static TemporalType[]` | `values()` Returns an array containing the constants of this enum type, in the order they are declared.

    - ### Methods inherited from class java.lang.Enum

      `compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

    - ### Methods inherited from class java.lang.Object

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Enum Constant Detail

    - #### DATE

          public static final TemporalType DATE

      Temporal representing only a date

    - #### TIME

          public static final TemporalType TIME

      Temporal representing only a time

    - #### DATE_TIME

          public static final TemporalType DATE_TIME

      Temporal representing a date and time

  - ### Method Detail

    - #### values

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

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

    - #### valueOf

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

    - #### getTemporalType

          public static Optional<TemporalType> getTemporalType(Temporal temporal)

      Get the temporal macro-type of given `temporal` instance, if available.
      Parameters:
        `temporal` - Temporal object
      Returns:
        `TemporalType` of given `Temporal`, empty if given temporal is `null`

    - #### getTemporalType

          public static Optional<TemporalType> getTemporalType(Class<?> type)

      Get the temporal macro-type of given `type`, if it is well-known temporal type.

      For `Date` and `Calendar` types, `DATE_TIME` is returned.

      Parameters:
        `type` - Type to inspect
      Returns:
        `TemporalType` of given type, empty if `null` or if it is not recognized as a known temporal type

Copyright © 2019 The Holon Platform. All rights reserved.