Enum UIDateTimeType

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<UIDateTimeType>

    public enum UIDateTimeType
    extends java.lang.Enum<UIDateTimeType>
    The date-time type of the component, i.e. the types Time, Date, DateTime or ZoneId.
    Author:
    Christopher Mindus
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      Date
      Date component, data type candidates: LocalDate.
      DateTime
      Date and time component, data type candidates: LocalDateTime, OffsetDateTime and ZonedDateTime.
      Time
      Time component, data type candidates: LocalTime, OffsetTime.
      ZoneId
      Zone component, data type candidates: ZoneId.
    • Enum Constant Detail

      • Time

        public static final UIDateTimeType Time
        Time component, data type candidates: LocalTime, OffsetTime.
      • Date

        public static final UIDateTimeType Date
        Date component, data type candidates: LocalDate.
      • DateTime

        public static final UIDateTimeType DateTime
        Date and time component, data type candidates: LocalDateTime, OffsetDateTime and ZonedDateTime.
      • ZoneId

        public static final UIDateTimeType ZoneId
        Zone component, data type candidates: ZoneId.
    • Method Detail

      • values

        public static UIDateTimeType[] 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 (UIDateTimeType c : UIDateTimeType.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static UIDateTimeType 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
        java.lang.NullPointerException - if the argument is null
      • isValid

        public boolean isValid​(UIDateTimeDataType dataType)
        Returns if a datatype is valid for this date-time type.
      • isValid

        public boolean isValid​(GDateTime dateTime)
        Returns if a GDateType value is valid for this date-time type.
      • isValid

        public boolean isValid​(GDateTime.Type dateTimeType)
        Returns if a GDateType type is valid for this date-time type.
      • getSupportedDataTypes

        public UIDateTimeDataType[] getSupportedDataTypes()
        Returns the supported date-time datatypes for this type.
      • getSupportedGDateTimeTypes

        public GDateTime.Type[] getSupportedGDateTimeTypes()
        Returns the supported GDateTime types for this type.