• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java FormatCharacterIterator类的典型用法和代码示例

java 3次浏览

本文整理汇总了Java中gnu.java.text.FormatCharacterIterator的典型用法代码示例。如果您正苦于以下问题:Java FormatCharacterIterator类的具体用法?Java FormatCharacterIterator怎么用?Java FormatCharacterIterator使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

FormatCharacterIterator类属于gnu.java.text包,在下文中一共展示了FormatCharacterIterator类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: formatToCharacterIterator

点赞 3

import gnu.java.text.FormatCharacterIterator; //导入依赖的package包/类
public AttributedCharacterIterator formatToCharacterIterator(Object date)
  throws IllegalArgumentException
{
  if (date == null)
    throw new NullPointerException("null argument");
  if (!(date instanceof Date))
    throw new IllegalArgumentException("argument should be an instance of java.util.Date");

  AttributedFormatBuffer buf = new AttributedFormatBuffer();
  formatWithAttribute((Date)date, buf,
                      null);
  buf.sync();

  return new FormatCharacterIterator(buf.getBuffer().toString(),
                                     buf.getRanges(),
                                     buf.getAttributes());
}
 

开发者ID:vilie,
项目名称:javify,
代码行数:18,
代码来源:SimpleDateFormat.java

示例2: formatToCharacterIterator

点赞 3

import gnu.java.text.FormatCharacterIterator; //导入依赖的package包/类
public AttributedCharacterIterator formatToCharacterIterator(Object date)
  throws IllegalArgumentException
{
  if (date == null)
    throw new NullPointerException("null argument");
  if (!(date instanceof Date))
    throw new IllegalArgumentException("argument should be an instance of java.util.Date");

  AttributedFormatBuffer buf = new AttributedFormatBuffer();
  formatWithAttribute((Date)date, buf,
	null);
  buf.sync();
      
  return new FormatCharacterIterator(buf.getBuffer().toString(),
		       buf.getRanges(),
		       buf.getAttributes());
}
 

开发者ID:nmldiegues,
项目名称:jvm-stm,
代码行数:18,
代码来源:SimpleDateFormat.java

示例3: formatToCharacterIterator

点赞 2

import gnu.java.text.FormatCharacterIterator; //导入依赖的package包/类
/**
 * A convinience method to format patterns.
 *
 * @param arguments The array containing the objects to be formatted.
 */
public AttributedCharacterIterator formatToCharacterIterator (Object arguments)
{
  Object[] arguments_array = (Object[])arguments;
  FormatCharacterIterator iterator = new FormatCharacterIterator();

  formatInternal(arguments_array, new StringBuffer(), null, iterator);

  return iterator;
}
 

开发者ID:vilie,
项目名称:javify,
代码行数:15,
代码来源:MessageFormat.java

示例4: formatToCharacterIterator

点赞 2

import gnu.java.text.FormatCharacterIterator; //导入依赖的package包/类
/**
 * A convinience method to format patterns.
 *
 * @param arguments The array containing the objects to be formatted.
 */
public AttributedCharacterIterator formatToCharacterIterator (Object arguments)
{
  Object[] arguments_array = (Object[])arguments;
  FormatCharacterIterator iterator = new FormatCharacterIterator();
  
  formatInternal(arguments_array, new StringBuffer(), null, iterator);

  return iterator;
}
 

开发者ID:nmldiegues,
项目名称:jvm-stm,
代码行数:15,
代码来源:MessageFormat.java

示例5: formatToCharacterIterator

点赞 2

import gnu.java.text.FormatCharacterIterator; //导入依赖的package包/类
public AttributedCharacterIterator formatToCharacterIterator(Object obj)
{
  return new FormatCharacterIterator(format(obj), null, null);
}
 

开发者ID:vilie,
项目名称:javify,
代码行数:5,
代码来源:Format.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)