Package com.opengamma.strata.measure
Class ValuationZoneTimeDefinition
- java.lang.Object
-
- com.opengamma.strata.measure.ValuationZoneTimeDefinition
-
- All Implemented Interfaces:
Serializable,org.joda.beans.Bean,org.joda.beans.ImmutableBean
public final class ValuationZoneTimeDefinition extends Object implements org.joda.beans.ImmutableBean, Serializable
Definition of valuation zone and time.This contains
ZoneIdand a set ofLocalTimeto createZonedDateTimefromLocalDate.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classValuationZoneTimeDefinition.MetaThe meta-bean forValuationZoneTimeDefinition.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)LocalTimegetDefaultLocalTime()Gets the default local time.ImmutableList<LocalTime>getLocalTimes()Gets the local time.ZoneIdgetZoneId()Gets the zone ID.inthashCode()static ValuationZoneTimeDefinition.Metameta()The meta-bean forValuationZoneTimeDefinition.ValuationZoneTimeDefinition.MetametaBean()static ValuationZoneTimeDefinitionof(LocalTime defaultLocalTime, ZoneId zoneId, LocalTime... localTimes)Obtains an instance.StringtoString()MarketDataBox<ZonedDateTime>toZonedDateTime(MarketDataBox<LocalDate> dates)Creates zoned date time.
-
-
-
Method Detail
-
of
public static ValuationZoneTimeDefinition of(LocalTime defaultLocalTime, ZoneId zoneId, LocalTime... localTimes)
Obtains an instance.- Parameters:
defaultLocalTime- default local timezoneId- the zone IDlocalTimes- the local time- Returns:
- the instance
-
toZonedDateTime
public MarketDataBox<ZonedDateTime> toZonedDateTime(MarketDataBox<LocalDate> dates)
Creates zoned date time.If the scenario size of
datesis greater than the size oflocalTimes,defaultLocalTimeis used. Ifdatesis single value,defaultLocalTimeis used.- Parameters:
dates- the local date- Returns:
- the zoned date time
-
meta
public static ValuationZoneTimeDefinition.Meta meta()
The meta-bean forValuationZoneTimeDefinition.- Returns:
- the meta-bean, not null
-
metaBean
public ValuationZoneTimeDefinition.Meta metaBean()
- Specified by:
metaBeanin interfaceorg.joda.beans.Bean
-
getDefaultLocalTime
public 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 ZoneId getZoneId()
Gets the zone ID.- Returns:
- the value of the property, not null
-
getLocalTimes
public ImmutableList<LocalTime> getLocalTimes()
Gets the local time.The local time in
zoneId. The size is not necessarily the same as the scenario size.defaultLocalTimewill be used if extraLocalTimeis required.- Returns:
- the value of the property, not null
-
-