@ImmutablePreBuild private static void preBuild(Builder builder) { if (builder.label == null && builder.strike != null) { builder.label = Pair.of(builder.period, builder.strike.getLabel()).toString(); } }
@ImmutablePreBuild private static void preBuild(Builder builder) { if (builder.label == null && builder.strike != null) { builder.label = Pair.of(builder.yearFraction, builder.strike.getLabel()).toString(); } }
@ImmutablePreBuild private static void preBuild(Builder builder) { if (builder.label == null && builder.strike != null) { builder.label = Pair.of(builder.yearFraction, builder.strike.getLabel()).toString(); } }
/** * Creates node metadata using year fraction and strike. * * @param yearFraction the year fraction * @param strike the strike * @return node metadata */ public static GenericVolatilitySurfaceYearFractionParameterMetadata of( double yearFraction, Strike strike) { String label = Pair.of(yearFraction, strike.getLabel()).toString(); return new GenericVolatilitySurfaceYearFractionParameterMetadata(yearFraction, strike, label); }
/** * Creates node metadata using period and strike. * * @param period the period * @param strike the strike * @return node metadata */ public static GenericVolatilitySurfacePeriodParameterMetadata of( Period period, Strike strike) { String label = Pair.of(period, strike.getLabel()).toString(); return new GenericVolatilitySurfacePeriodParameterMetadata(period, strike, label); }
/** * Creates node metadata using year fraction, strike and currency pair. * * @param yearFraction the year fraction * @param strike the strike * @param currencyPair the currency pair * @return node metadata */ public static FxVolatilitySurfaceYearFractionParameterMetadata of( double yearFraction, Strike strike, CurrencyPair currencyPair) { String label = Pair.of(yearFraction, strike.getLabel()).toString(); return new FxVolatilitySurfaceYearFractionParameterMetadata(yearFraction, strike, currencyPair, label); }