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

x33g5p2x  于2022-01-26 转载在 其他  
字(6.3k)|赞(0)|评价(0)|浏览(152)

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

Partial.getFormatter介绍

[英]Gets a formatter suitable for the fields in this partial.

If there is no appropriate ISO format, null is returned. This method may return a formatter that does not display all the fields of the partial. This might occur when you have overlapping fields, such as dayOfWeek and dayOfMonth.
[中]获取适用于此部分中的字段的格式设置程序。
如果没有合适的ISO格式,则返回null。此方法可能会返回一个格式设置程序,该格式设置程序不会显示分部的所有字段。当有重叠字段时,例如dayOfWeek和dayOfMonth,可能会发生这种情况。

代码示例

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

  1. /**
  2. * Output the date in an appropriate ISO8601 format.
  3. * <p>
  4. * This method will output the partial in one of two ways.
  5. * If {@link #getFormatter()}
  6. * <p>
  7. * If there is no appropriate ISO format a dump of the fields is output
  8. * via {@link #toStringList()}.
  9. *
  10. * @return ISO8601 formatted string
  11. */
  12. public String toString() {
  13. DateTimeFormatter[] f = iFormatter;
  14. if (f == null) {
  15. getFormatter();
  16. f = iFormatter;
  17. if (f == null) {
  18. return toStringList();
  19. }
  20. }
  21. DateTimeFormatter f1 = f[1];
  22. if (f1 == null) {
  23. return toStringList();
  24. }
  25. return f1.print(this);
  26. }

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

  1. /**
  2. * Output the date in an appropriate ISO8601 format.
  3. * <p>
  4. * This method will output the partial in one of two ways.
  5. * If {@link #getFormatter()}
  6. * <p>
  7. * If there is no appropriate ISO format a dump of the fields is output
  8. * via {@link #toStringList()}.
  9. *
  10. * @return ISO8601 formatted string
  11. */
  12. public String toString() {
  13. DateTimeFormatter[] f = iFormatter;
  14. if (f == null) {
  15. getFormatter();
  16. f = iFormatter;
  17. if (f == null) {
  18. return toStringList();
  19. }
  20. }
  21. DateTimeFormatter f1 = f[1];
  22. if (f1 == null) {
  23. return toStringList();
  24. }
  25. return f1.print(this);
  26. }

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

  1. /**
  2. * Output the date in an appropriate ISO8601 format.
  3. * <p>
  4. * This method will output the partial in one of two ways.
  5. * If {@link #getFormatter()}
  6. * <p>
  7. * If there is no appropriate ISO format a dump of the fields is output
  8. * via {@link #toStringList()}.
  9. *
  10. * @return ISO8601 formatted string
  11. */
  12. public String toString() {
  13. DateTimeFormatter[] f = iFormatter;
  14. if (f == null) {
  15. getFormatter();
  16. f = iFormatter;
  17. if (f == null) {
  18. return toStringList();
  19. }
  20. }
  21. DateTimeFormatter f1 = f[1];
  22. if (f1 == null) {
  23. return toStringList();
  24. }
  25. return f1.print(this);
  26. }

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

  1. /**
  2. * Output the date in an appropriate ISO8601 format.
  3. * <p>
  4. * This method will output the partial in one of two ways.
  5. * If {@link #getFormatter()}
  6. * <p>
  7. * If there is no appropriate ISO format a dump of the fields is output
  8. * via {@link #toStringList()}.
  9. *
  10. * @return ISO8601 formatted string
  11. */
  12. public String toString() {
  13. DateTimeFormatter[] f = iFormatter;
  14. if (f == null) {
  15. getFormatter();
  16. f = iFormatter;
  17. if (f == null) {
  18. return toStringList();
  19. }
  20. }
  21. DateTimeFormatter f1 = f[1];
  22. if (f1 == null) {
  23. return toStringList();
  24. }
  25. return f1.print(this);
  26. }

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

  1. /**
  2. * Output the date in an appropriate ISO8601 format.
  3. * <p>
  4. * This method will output the partial in one of two ways.
  5. * If {@link #getFormatter()}
  6. * <p>
  7. * If there is no appropriate ISO format a dump of the fields is output
  8. * via {@link #toStringList()}.
  9. *
  10. * @return ISO8601 formatted string
  11. */
  12. public String toString() {
  13. DateTimeFormatter[] f = iFormatter;
  14. if (f == null) {
  15. getFormatter();
  16. f = iFormatter;
  17. if (f == null) {
  18. return toStringList();
  19. }
  20. }
  21. DateTimeFormatter f1 = f[1];
  22. if (f1 == null) {
  23. return toStringList();
  24. }
  25. return f1.print(this);
  26. }

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

  1. /**
  2. * Output the date in an appropriate ISO8601 format.
  3. * <p>
  4. * This method will output the partial in one of two ways.
  5. * If {@link #getFormatter()}
  6. * <p>
  7. * If there is no appropriate ISO format a dump of the fields is output
  8. * via {@link #toStringList()}.
  9. *
  10. * @return ISO8601 formatted string
  11. */
  12. public String toString() {
  13. DateTimeFormatter[] f = iFormatter;
  14. if (f == null) {
  15. getFormatter();
  16. f = iFormatter;
  17. if (f == null) {
  18. return toStringList();
  19. }
  20. }
  21. DateTimeFormatter f1 = f[1];
  22. if (f1 == null) {
  23. return toStringList();
  24. }
  25. return f1.print(this);
  26. }

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

  1. /**
  2. * Output the date in an appropriate ISO8601 format.
  3. * <p>
  4. * This method will output the partial in one of two ways.
  5. * If {@link #getFormatter()}
  6. * <p>
  7. * If there is no appropriate ISO format a dump of the fields is output
  8. * via {@link #toStringList()}.
  9. *
  10. * @return ISO8601 formatted string
  11. */
  12. public String toString() {
  13. DateTimeFormatter[] f = iFormatter;
  14. if (f == null) {
  15. getFormatter();
  16. f = iFormatter;
  17. if (f == null) {
  18. return toStringList();
  19. }
  20. }
  21. DateTimeFormatter f1 = f[1];
  22. if (f1 == null) {
  23. return toStringList();
  24. }
  25. return f1.print(this);
  26. }

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

  1. /**
  2. * Output the date in an appropriate ISO8601 format.
  3. * <p>
  4. * This method will output the partial in one of two ways.
  5. * If {@link #getFormatter()}
  6. * <p>
  7. * If there is no appropriate ISO format a dump of the fields is output
  8. * via {@link #toStringList()}.
  9. *
  10. * @return ISO8601 formatted string
  11. */
  12. public String toString() {
  13. DateTimeFormatter[] f = iFormatter;
  14. if (f == null) {
  15. getFormatter();
  16. f = iFormatter;
  17. if (f == null) {
  18. return toStringList();
  19. }
  20. }
  21. DateTimeFormatter f1 = f[1];
  22. if (f1 == null) {
  23. return toStringList();
  24. }
  25. return f1.print(this);
  26. }

代码示例来源:origin: org.joda/com.springsource.org.joda.time

  1. /**
  2. * Output the date in an appropriate ISO8601 format.
  3. * <p>
  4. * This method will output the partial in one of two ways.
  5. * If {@link #getFormatter()}
  6. * <p>
  7. * If there is no appropriate ISO format a dump of the fields is output
  8. * via {@link #toStringList()}.
  9. *
  10. * @return ISO8601 formatted string
  11. */
  12. public String toString() {
  13. DateTimeFormatter[] f = iFormatter;
  14. if (f == null) {
  15. getFormatter();
  16. f = iFormatter;
  17. if (f == null) {
  18. return toStringList();
  19. }
  20. }
  21. DateTimeFormatter f1 = f[1];
  22. if (f1 == null) {
  23. return toStringList();
  24. }
  25. return f1.print(this);
  26. }

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

  1. /**
  2. * Output the date in an appropriate ISO8601 format.
  3. * <p>
  4. * This method will output the partial in one of two ways.
  5. * If {@link #getFormatter()}
  6. * <p>
  7. * If there is no appropriate ISO format a dump of the fields is output
  8. * via {@link #toStringList()}.
  9. *
  10. * @return ISO8601 formatted string
  11. */
  12. public String toString() {
  13. DateTimeFormatter[] f = iFormatter;
  14. if (f == null) {
  15. getFormatter();
  16. f = iFormatter;
  17. if (f == null) {
  18. return toStringList();
  19. }
  20. }
  21. DateTimeFormatter f1 = f[1];
  22. if (f1 == null) {
  23. return toStringList();
  24. }
  25. return f1.print(this);
  26. }

代码示例来源:origin: redfish64/TinyTravelTracker

  1. /**
  2. * Output the date in an appropriate ISO8601 format.
  3. * <p>
  4. * This method will output the partial in one of two ways.
  5. * If {@link #getFormatter()}
  6. * <p>
  7. * If there is no appropriate ISO format a dump of the fields is output
  8. * via {@link #toStringList()}.
  9. *
  10. * @return ISO8601 formatted string
  11. */
  12. public String toString() {
  13. DateTimeFormatter[] f = iFormatter;
  14. if (f == null) {
  15. getFormatter();
  16. f = iFormatter;
  17. if (f == null) {
  18. return toStringList();
  19. }
  20. }
  21. DateTimeFormatter f1 = f[1];
  22. if (f1 == null) {
  23. return toStringList();
  24. }
  25. return f1.print(this);
  26. }

相关文章