java.text.SimpleDateFormat.formatToCharacterIterator()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(2.5k)|赞(0)|评价(0)|浏览(137)

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

SimpleDateFormat.formatToCharacterIterator介绍

[英]Formats the specified object using the rules of this simple date format and returns an AttributedCharacterIterator with the formatted date and attributes.
[中]使用此简单日期格式的规则格式化指定对象,并返回带有格式化日期和属性的AttributedCharacterIterator。

代码示例

代码示例来源:origin: pentaho/pentaho-kettle

  1. /**
  2. * See <code>SimpleDateFormat</code> description. This is dummy method to deprecate using parent implementation for
  3. * <code>Timestamp</code> until it is not fully implemented.
  4. */
  5. @Override
  6. public AttributedCharacterIterator formatToCharacterIterator( Object obj ) {
  7. if ( obj instanceof Timestamp ) {
  8. throw new IllegalArgumentException(
  9. "This functionality for Timestamp object has not been implemented yet" );
  10. }
  11. if ( compatibleToSuperPattern ) {
  12. return super.formatToCharacterIterator( obj );
  13. } else {
  14. throw new IllegalArgumentException(
  15. "This functionality for specified format pattern has not been implemented yet" );
  16. }
  17. }

代码示例来源:origin: stackoverflow.com

  1. return localSimpleDateFormat.get().formatToCharacterIterator(obj);

代码示例来源:origin: org.leapframework/leap-lang

  1. @Override
  2. public synchronized AttributedCharacterIterator formatToCharacterIterator(Object obj) {
  3. return format.formatToCharacterIterator(obj);
  4. }

代码示例来源:origin: org.refcodes/refcodes-date

  1. /**
  2. * {@inheritDoc}
  3. *
  4. * @deprecated as it is not considered to be thread safe.
  5. */
  6. @Deprecated
  7. @Override
  8. public AttributedCharacterIterator formatToCharacterIterator( Object obj ) {
  9. return super.formatToCharacterIterator( obj );
  10. }

代码示例来源:origin: novoda/notils

  1. public AttributedCharacterIterator formatToCharacterIterator(Object object) {
  2. return localSimpleDateFormat.get().formatToCharacterIterator(object);
  3. }

代码示例来源:origin: com.novoda/notils

  1. public AttributedCharacterIterator formatToCharacterIterator(Object object) {
  2. return localSimpleDateFormat.get().formatToCharacterIterator(object);
  3. }

代码示例来源:origin: EvoSuite/evosuite

  1. public AttributedCharacterIterator formatToCharacterIterator(Object obj) {
  2. Capturer.capture(Instrumenter.CAPTURE_ID_JAVA_TEXT_SIMPLEDATEFORMAT, this, "formatToCharacterIterator", "(Ljava/lang/Object;)Ljava/text/AttributedCharacterIterator;", new Object[] {obj});
  3. AttributedCharacterIterator ret = super.formatToCharacterIterator(obj);
  4. Capturer.enable(Instrumenter.CAPTURE_ID_JAVA_TEXT_SIMPLEDATEFORMAT, this, ret);
  5. return ret;
  6. }

相关文章

SimpleDateFormat类方法