org.joda.time.YearMonth.getValue()方法的使用及代码示例

x33g5p2x  于2022-02-05 转载在 其他  
字(5.5k)|赞(0)|评价(0)|浏览(141)

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

YearMonth.getValue介绍

暂无

代码示例

代码示例来源:origin: joda-time/joda-time

  1. /**
  2. * Get the year field value.
  3. *
  4. * @return the year
  5. */
  6. public int getYear() {
  7. return getValue(YEAR);
  8. }

代码示例来源:origin: joda-time/joda-time

  1. /**
  2. * Returns a copy of this year-month with the specified field set to a new value.
  3. * <p>
  4. * For example, if the field type is <code>monthOfYear</code> then the month
  5. * would be changed in the returned instance.
  6. * <p>
  7. * These three lines are equivalent:
  8. * <pre>
  9. * YearMonth updated = ym.withField(DateTimeFieldType.monthOfYear(), 6);
  10. * YearMonth updated = ym.monthOfYear().setCopy(6);
  11. * YearMonth updated = ym.property(DateTimeFieldType.monthOfYear()).setCopy(6);
  12. * </pre>
  13. *
  14. * @param fieldType the field type to set, not null
  15. * @param value the value to set
  16. * @return a copy of this instance with the field set, never null
  17. * @throws IllegalArgumentException if the value is null or invalid
  18. */
  19. public YearMonth withField(DateTimeFieldType fieldType, int value) {
  20. int index = indexOfSupported(fieldType);
  21. if (value == getValue(index)) {
  22. return this;
  23. }
  24. int[] newValues = getValues();
  25. newValues = getField(index).set(this, index, newValues, value);
  26. return new YearMonth(this, newValues);
  27. }

代码示例来源:origin: joda-time/joda-time

  1. /**
  2. * Get the month of year field value.
  3. *
  4. * @return the month of year
  5. */
  6. public int getMonthOfYear() {
  7. return getValue(MONTH_OF_YEAR);
  8. }

代码示例来源:origin: JodaOrg/joda-time

  1. /**
  2. * Returns a copy of this year-month with the specified field set to a new value.
  3. * <p>
  4. * For example, if the field type is <code>monthOfYear</code> then the month
  5. * would be changed in the returned instance.
  6. * <p>
  7. * These three lines are equivalent:
  8. * <pre>
  9. * YearMonth updated = ym.withField(DateTimeFieldType.monthOfYear(), 6);
  10. * YearMonth updated = ym.monthOfYear().setCopy(6);
  11. * YearMonth updated = ym.property(DateTimeFieldType.monthOfYear()).setCopy(6);
  12. * </pre>
  13. *
  14. * @param fieldType the field type to set, not null
  15. * @param value the value to set
  16. * @return a copy of this instance with the field set, never null
  17. * @throws IllegalArgumentException if the value is null or invalid
  18. */
  19. public YearMonth withField(DateTimeFieldType fieldType, int value) {
  20. int index = indexOfSupported(fieldType);
  21. if (value == getValue(index)) {
  22. return this;
  23. }
  24. int[] newValues = getValues();
  25. newValues = getField(index).set(this, index, newValues, value);
  26. return new YearMonth(this, newValues);
  27. }

代码示例来源:origin: joda-time/joda-time

  1. /**
  2. * Gets the value of this field.
  3. *
  4. * @return the field value
  5. */
  6. public int get() {
  7. return iBase.getValue(iFieldIndex);
  8. }

代码示例来源:origin: camunda/camunda-bpm-platform

  1. /**
  2. * Returns a copy of this year-month with the specified field set to a new value.
  3. * <p>
  4. * For example, if the field type is <code>monthOfYear</code> then the month
  5. * would be changed in the returned instance.
  6. * <p>
  7. * These three lines are equivalent:
  8. * <pre>
  9. * YearMonth updated = ym.withField(DateTimeFieldType.monthOfYear(), 6);
  10. * YearMonth updated = ym.monthOfYear().setCopy(6);
  11. * YearMonth updated = ym.property(DateTimeFieldType.monthOfYear()).setCopy(6);
  12. * </pre>
  13. *
  14. * @param fieldType the field type to set, not null
  15. * @param value the value to set
  16. * @return a copy of this instance with the field set, never null
  17. * @throws IllegalArgumentException if the value is null or invalid
  18. */
  19. public YearMonth withField(DateTimeFieldType fieldType, int value) {
  20. int index = indexOfSupported(fieldType);
  21. if (value == getValue(index)) {
  22. return this;
  23. }
  24. int[] newValues = getValues();
  25. newValues = getField(index).set(this, index, newValues, value);
  26. return new YearMonth(this, newValues);
  27. }

代码示例来源:origin: JodaOrg/joda-time

  1. /**
  2. * Get the year field value.
  3. *
  4. * @return the year
  5. */
  6. public int getYear() {
  7. return getValue(YEAR);
  8. }

代码示例来源:origin: JodaOrg/joda-time

  1. /**
  2. * Gets the value of this field.
  3. *
  4. * @return the field value
  5. */
  6. public int get() {
  7. return iBase.getValue(iFieldIndex);
  8. }

代码示例来源:origin: JodaOrg/joda-time

  1. /**
  2. * Get the month of year field value.
  3. *
  4. * @return the month of year
  5. */
  6. public int getMonthOfYear() {
  7. return getValue(MONTH_OF_YEAR);
  8. }

代码示例来源:origin: camunda/camunda-bpm-platform

  1. /**
  2. * Gets the value of this field.
  3. *
  4. * @return the field value
  5. */
  6. public int get() {
  7. return iBase.getValue(iFieldIndex);
  8. }

代码示例来源:origin: camunda/camunda-bpm-platform

  1. /**
  2. * Get the year field value.
  3. *
  4. * @return the year
  5. */
  6. public int getYear() {
  7. return getValue(YEAR);
  8. }

代码示例来源:origin: camunda/camunda-bpm-platform

  1. /**
  2. * Get the month of year field value.
  3. *
  4. * @return the month of year
  5. */
  6. public int getMonthOfYear() {
  7. return getValue(MONTH_OF_YEAR);
  8. }

代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby

  1. /**
  2. * Get the month of year field value.
  3. *
  4. * @return the month of year
  5. */
  6. public int getMonthOfYear() {
  7. return getValue(MONTH_OF_YEAR);
  8. }

代码示例来源:origin: io.virtdata/virtdata-lib-realer

  1. /**
  2. * Get the month of year field value.
  3. *
  4. * @return the month of year
  5. */
  6. public int getMonthOfYear() {
  7. return getValue(MONTH_OF_YEAR);
  8. }

代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-analytics

  1. /**
  2. * Get the month of year field value.
  3. *
  4. * @return the month of year
  5. */
  6. public int getMonthOfYear() {
  7. return getValue(MONTH_OF_YEAR);
  8. }

代码示例来源:origin: Nextdoor/bender

  1. /**
  2. * Get the year field value.
  3. *
  4. * @return the year
  5. */
  6. public int getYear() {
  7. return getValue(YEAR);
  8. }

代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby

  1. /**
  2. * Get the year field value.
  3. *
  4. * @return the year
  5. */
  6. public int getYear() {
  7. return getValue(YEAR);
  8. }

代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby

  1. /**
  2. * Gets the value of this field.
  3. *
  4. * @return the field value
  5. */
  6. public int get() {
  7. return iBase.getValue(iFieldIndex);
  8. }

代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-analytics

  1. /**
  2. * Gets the value of this field.
  3. *
  4. * @return the field value
  5. */
  6. public int get() {
  7. return iBase.getValue(iFieldIndex);
  8. }

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.joda-time

  1. /**
  2. * Get the month of year field value.
  3. *
  4. * @return the month of year
  5. */
  6. public int getMonthOfYear() {
  7. return getValue(MONTH_OF_YEAR);
  8. }

相关文章