Class ValuationZoneTimeDefinition

  • All Implemented Interfaces:
    java.io.Serializable, Bean, ImmutableBean

    public final class ValuationZoneTimeDefinition
    extends java.lang.Object
    implements ImmutableBean, java.io.Serializable
    Definition of valuation zone and time.

    This contains ZoneId and a set of LocalTime to create ZonedDateTime from LocalDate.

    See Also:
    Serialized Form
    • Method Detail

      • of

        public static ValuationZoneTimeDefinition of​(java.time.LocalTime defaultLocalTime,
                                                     java.time.ZoneId zoneId,
                                                     java.time.LocalTime... localTimes)
        Obtains an instance.
        Parameters:
        defaultLocalTime - default local time
        zoneId - the zone ID
        localTimes - the local time
        Returns:
        the instance
      • toZonedDateTime

        public MarketDataBox<java.time.ZonedDateTime> toZonedDateTime​(MarketDataBox<java.time.LocalDate> dates)
        Creates zoned date time.

        If the scenario size of dates is greater than the size of localTimes, defaultLocalTime is used. If dates is single value, defaultLocalTime is used.

        Parameters:
        dates - the local date
        Returns:
        the zoned date time
      • getDefaultLocalTime

        public java.time.LocalTime getDefaultLocalTime()
        Gets the default local time.

        The default local time will be used if the input date is not scenario value or if the scenario size of the input date exceeds the size of localTimes.

        Returns:
        the value of the property, not null
      • getZoneId

        public java.time.ZoneId getZoneId()
        Gets the zone ID.
        Returns:
        the value of the property, not null
      • getLocalTimes

        public com.google.common.collect.ImmutableList<java.time.LocalTime> getLocalTimes()
        Gets the local time.

        The local time in zoneId. The size is not necessarily the same as the scenario size. defaultLocalTime will be used if extra LocalTime is required.

        Returns:
        the value of the property, not null
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object