gpt4 book ai didi

java.time.YearMonth.plus()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-18 00:12:40 28 4
gpt4 key购买 nike

本文整理了Java中java.time.YearMonth.plus()方法的一些代码示例,展示了YearMonth.plus()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YearMonth.plus()方法的具体详情如下:
包路径:java.time.YearMonth
类名称:YearMonth
方法名:plus

YearMonth.plus介绍

暂无

代码示例

代码示例来源:origin: jfoenixadmin/JFoenix

private void goToDayCell(DateCell dateCell, int offset, ChronoUnit unit, boolean focusDayCell) {
  YearMonth yearMonth = selectedYearMonth.get().plus(offset, unit);
  goToDate(dayCellDate(dateCell).plus(offset, unit).withYear(yearMonth.getYear()), focusDayCell);
}

代码示例来源:origin: com.github.seratch/java-time-backport

/**
 * {@inheritDoc}
 * @throws DateTimeException {@inheritDoc}
 * @throws ArithmeticException {@inheritDoc}
 */
@Override
public YearMonth minus(long amountToSubtract, TemporalUnit unit) {
  return (amountToSubtract == Long.MIN_VALUE ? plus(Long.MAX_VALUE, unit).plus(1, unit) : plus(-amountToSubtract, unit));
}

代码示例来源:origin: owlike/genson

private static YearMonth fromEpochMonth(long months){
    return EPOCH_YEAR_MONTH.plus(months, ChronoUnit.MONTHS);
  }
}

代码示例来源:origin: OpenGamma/Strata

public void coverage() {
 InflationNodalCurveDefinition test = new InflationNodalCurveDefinition(
   UNDERLYING_DEF, LAST_FIX_MONTH, LAST_FIX_VALUE, SEASONALITY_DEF);
 coverImmutableBean(test);
 InterpolatedNodalCurveDefinition underlyingDef2 = InterpolatedNodalCurveDefinition.builder()
   .name(CurveName.of("foo"))
   .xValueType(ValueType.YEAR_FRACTION)
   .yValueType(ValueType.ZERO_RATE)
   .dayCount(ACT_365F)
   .nodes(NODES)
   .interpolator(CurveInterpolators.LINEAR)
   .extrapolatorLeft(CurveExtrapolators.FLAT)
   .extrapolatorRight(CurveExtrapolators.FLAT)
   .build();
 SeasonalityDefinition seasonalityDef2 =
   SeasonalityDefinition.of(SEASONALITY_ADDITIVE, ShiftType.SCALED);
 InflationNodalCurveDefinition test2 = new InflationNodalCurveDefinition(
   underlyingDef2, LAST_FIX_MONTH.plus(Period.ofMonths(1)), LAST_FIX_VALUE + 1.0d, seasonalityDef2);
 coverBeanEquals(test, test2);
}

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com