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
ZoneId
and a set ofLocalTime
to createZonedDateTime
fromLocalDate
.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ValuationZoneTimeDefinition.Meta
The meta-bean forValuationZoneTimeDefinition
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
LocalTime
getDefaultLocalTime()
Gets the default local time.ImmutableList<LocalTime>
getLocalTimes()
Gets the local time.ZoneId
getZoneId()
Gets the zone ID.int
hashCode()
static ValuationZoneTimeDefinition.Meta
meta()
The meta-bean forValuationZoneTimeDefinition
.ValuationZoneTimeDefinition.Meta
metaBean()
static ValuationZoneTimeDefinition
of(LocalTime defaultLocalTime, ZoneId zoneId, LocalTime... localTimes)
Obtains an instance.String
toString()
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
dates
is greater than the size oflocalTimes
,defaultLocalTime
is used. Ifdates
is single value,defaultLocalTime
is 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:
metaBean
in 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.defaultLocalTime
will be used if extraLocalTime
is required.- Returns:
- the value of the property, not null
-
-