gpt4 book ai didi

com.opengamma.strata.market.param.YearMonthDateParameterMetadata.getLabel()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-18 03:01:31 25 4
gpt4 key购买 nike

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

YearMonthDateParameterMetadata.getLabel介绍

[英]Gets the label that describes the parameter, defaulted to the year-month.
[中]获取描述参数的标签,默认为年-月。

代码示例

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

@Override
protected Object propertyGet(Bean bean, String propertyName, boolean quiet) {
 switch (propertyName.hashCode()) {
  case 3076014:  // date
   return ((YearMonthDateParameterMetadata) bean).getDate();
  case -496678845:  // yearMonth
   return ((YearMonthDateParameterMetadata) bean).getYearMonth();
  case 102727412:  // label
   return ((YearMonthDateParameterMetadata) bean).getLabel();
 }
 return super.propertyGet(bean, propertyName, quiet);
}

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

public void test_of_label() {
 YearMonthDateParameterMetadata test = YearMonthDateParameterMetadata.of(DATE, JAN2015, "Jan 2015");
 assertEquals(test.getDate(), DATE);
 assertEquals(test.getYearMonth(), JAN2015);
 assertEquals(test.getLabel(), "Jan 2015");
 assertEquals(test.getIdentifier(), JAN2015);
}

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

public void test_of_noLabel() {
 YearMonthDateParameterMetadata test = YearMonthDateParameterMetadata.of(DATE, JAN2015);
 assertEquals(test.getDate(), DATE);
 assertEquals(test.getYearMonth(), JAN2015);
 assertEquals(test.getLabel(), "Jan15");
 assertEquals(test.getIdentifier(), JAN2015);
}

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

public void test_builder_defaultLabel() {
 BeanBuilder<? extends YearMonthDateParameterMetadata> builder = YearMonthDateParameterMetadata.meta().builder();
 builder.set(YearMonthDateParameterMetadata.meta().date(), DATE);
 builder.set(YearMonthDateParameterMetadata.meta().yearMonth(), JAN2015);
 YearMonthDateParameterMetadata test = builder.build();
 assertEquals(test.getDate(), DATE);
 assertEquals(test.getYearMonth(), JAN2015);
 assertEquals(test.getLabel(), "Jan15");
 assertEquals(test.getIdentifier(), JAN2015);
}

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

public void test_builder_specifyLabel() {
 BeanBuilder<? extends YearMonthDateParameterMetadata> builder = YearMonthDateParameterMetadata.meta().builder();
 builder.set(YearMonthDateParameterMetadata.meta().date(), DATE);
 builder.set(YearMonthDateParameterMetadata.meta().yearMonth(), JAN2015);
 builder.set(YearMonthDateParameterMetadata.meta().label(), "Jan 2015");
 YearMonthDateParameterMetadata test = builder.build();
 assertEquals(test.getDate(), DATE);
 assertEquals(test.getYearMonth(), JAN2015);
 assertEquals(test.getLabel(), "Jan 2015");
 assertEquals(test.getIdentifier(), JAN2015);
}

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