java.text.DateFormat.getNumberFormat()方法的使用及代码示例

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

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

DateFormat.getNumberFormat介绍

[英]Returns the NumberFormat used by this DateFormat.
[中]返回此DateFormat使用的NumberFormat。

代码示例

代码示例来源:origin: log4j/log4j

/**
 * Gets number formatter.
 *
 * @return NumberFormat number formatter
 */
public NumberFormat getNumberFormat() {
 return formatter.getNumberFormat();
}

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

return localSimpleDateFormat.get().getNumberFormat();

代码示例来源:origin: apache/log4j

/**
 * Gets number formatter.
 *
 * @return NumberFormat number formatter
 */
public NumberFormat getNumberFormat() {
 return formatter.getNumberFormat();
}

代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded

/**
 * Gets number formatter.
 *
 * @return NumberFormat number formatter
 */
public NumberFormat getNumberFormat() {
 return formatter.getNumberFormat();
}

代码示例来源:origin: org.apache.activemq/activemq-all

/**
 * Gets number formatter.
 *
 * @return NumberFormat number formatter
 */
public NumberFormat getNumberFormat() {
 return formatter.getNumberFormat();
}

代码示例来源:origin: org.jboss.logmanager/log4j-jboss-logmanager

/**
 * Gets number formatter.
 *
 * @return NumberFormat number formatter
 */
public NumberFormat getNumberFormat() {
 return formatter.getNumberFormat();
}

代码示例来源:origin: ops4j/org.ops4j.pax.logging

/**
 * Gets number formatter.
 *
 * @return NumberFormat number formatter
 */
@Override
public NumberFormat getNumberFormat() {
  return formatter.getNumberFormat();
}

代码示例来源:origin: com.jgoodies/jgoodies-common

@Override
public NumberFormat getNumberFormat() {
  return delegate.getNumberFormat();
}

代码示例来源:origin: org.apache.log4j/com.springsource.org.apache.log4j

/**
 * Gets number formatter.
 *
 * @return NumberFormat number formatter
 */
public NumberFormat getNumberFormat() {
 return formatter.getNumberFormat();
}

代码示例来源:origin: com.atlassian.jira/jira-core

@Override
public NumberFormat getNumberFormat()
{
  return delegate.get().getNumberFormat();
}

代码示例来源:origin: com.github.XDean/Java-EX

@Override
public NumberFormat getNumberFormat() {
 return get().getNumberFormat();
}

代码示例来源:origin: at.bestsolution.efxclipse.eclipse/com.ibm.icu.base

/**
 * Returns the number formatter which this date/time formatter uses to
 * format and parse a time.
 * @return the number formatter which this date/time formatter uses.
 * @stable ICU 2.0
 */
public NumberFormat getNumberFormat()
{
  return new NumberFormat(dateFormat.getNumberFormat());
}

代码示例来源:origin: org.apache.velocity.tools/velocity-tools-generic

TimeZoneIDSuffixFormat(DateFormat wrappedFormat)
{
  this.wrappedFormat = wrappedFormat;
  this.calendar = wrappedFormat.getCalendar();
  this.numberFormat = wrappedFormat.getNumberFormat();
}

代码示例来源:origin: at.bestsolution.eclipse/com.ibm.icu.base

/**
 * Returns the number formatter which this date/time formatter uses to
 * format and parse a time.
 * @return the number formatter which this date/time formatter uses.
 * @stable ICU 2.0
 */
public NumberFormat getNumberFormat()
{
  return new NumberFormat(dateFormat.getNumberFormat());
}

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

public NumberFormat getNumberFormat()
{
  Capturer.capture(Instrumenter.CAPTURE_ID_JAVA_TEXT_DATEFORMAT, this, "getNumberFormat", "()Ljava/text/NumberFormat;", new Object[] {});
  NumberFormat ret = super.getNumberFormat();
  Capturer.enable(Instrumenter.CAPTURE_ID_JAVA_TEXT_DATEFORMAT, this, ret);
  return ret;
}

代码示例来源:origin: ESAPI/esapi-java-legacy

throw new ValidationException(context
    + ": Invalid date must follow the "
    + format.getNumberFormat() + " format",
    "Invalid date: context=" + context + ", format=" + format
        + ", input=" + input, e, context);

代码示例来源:origin: org.owasp.esapi/esapi

private Date safelyParse(String context, String input)
      throws ValidationException {
    // CHECKME should this allow empty Strings? "   " use IsBlank instead?
    if (StringUtilities.isEmpty(input)) {
      if (allowNull) {
        return null;
      }
      throw new ValidationException(context + ": Input date required",
          "Input date required: context=" + context + ", input="
              + input, context);
    }

    String canonical = encoder.canonicalize(input);

    try {
      return format.parse(canonical);
    } catch (Exception e) {
      throw new ValidationException(context
          + ": Invalid date must follow the "
          + format.getNumberFormat() + " format",
          "Invalid date: context=" + context + ", format=" + format
              + ", input=" + input, e, context);
    }
  }
}

相关文章