Package java.util

Examples of java.util.Formatter$FormatSpecifier$BigDecimalLayout


        private final String className;
        private boolean dynamicAware;

        private ClassBuilderImpl(Class<T> type) {
            className = type.getSimpleName() + "_Generated";
            src = new Formatter();
            this.type = type;
        }
View Full Code Here


  public final double score() {
    return score;
  }
 
  public final String score( int digits ) {
    return new Formatter( new StringBuilder() ).format( "%." + digits + "f", Double.valueOf( score ) ).out().toString();
  }
View Full Code Here

    try {
      factory = (T) Class.forName(path).newInstance();

    } catch (final Exception e) {

      final Formatter out = new Formatter();

      logger.error(out.format("Unable to load factory class [%s]", path)
          .toString());

//      throw new IllegalStateException(e);
    }
  }
View Full Code Here

   * this instance of the Java virtual machine.
   * </P>
   */
  public PacketFormatter() {
    JNetStreamInitializer.init();
    this.platformFormatter = new Formatter();
    this.out = this.platformFormatter.out();
    this.locale = this.platformFormatter.locale();
    this.delagate = PacketFormatter.registry.get(
        PacketFormatter.DEFAULT_FORMAT_TYPE).newInstance(
        this.platformFormatter, this.out, this.locale);
View Full Code Here

   *          Destination for the formatted output. If a is null then a
   *          StringBuilder will be created.
   */
  public PacketFormatter(final Appendable a) {
    JNetStreamInitializer.init();
    this.platformFormatter = new Formatter(a);
    this.out = a;
    this.locale = this.platformFormatter.locale();
    this.delagate = PacketFormatter.registry.get(
        PacketFormatter.DEFAULT_FORMAT_TYPE).newInstance(
        this.platformFormatter, this.out, this.locale);
View Full Code Here

   *          The locale to apply during formatting. If l is null then no
   *          localization is applied.
   */
  public PacketFormatter(final Appendable a, final Locale l) {
    JNetStreamInitializer.init();
    this.platformFormatter = new Formatter(a, l);
    this.out = a;
    this.locale = l;
    this.delagate = PacketFormatter.registry.get(
        PacketFormatter.DEFAULT_FORMAT_TYPE).newInstance(
        this.platformFormatter, this.out, this.locale);
View Full Code Here

    this.delagate = this;
  }

  public PacketFormatter(final FormatterType formatType) {
    JNetStreamInitializer.init();
    this.platformFormatter = new Formatter();
    this.out = this.platformFormatter.out();
    this.locale = this.platformFormatter.locale();
    this.delagate = PacketFormatter.registry.get(formatType).newInstance(
        this.platformFormatter, this.out, this.locale);
  }
View Full Code Here

  }

  public PacketFormatter(final FormatterType formatType, final Appendable a) {
    JNetStreamInitializer.init();
    this.out = a;
    this.platformFormatter = new Formatter(a);
    this.locale = this.platformFormatter.locale();
    this.delagate = PacketFormatter.registry.get(formatType).newInstance(
        this.platformFormatter, this.out, this.locale);
  }
View Full Code Here

  public PacketFormatter(final FormatterType formatType, final Appendable a,
      final Locale l) {
    JNetStreamInitializer.init();
    this.out = a;
    this.locale = l;
    this.platformFormatter = new Formatter(a, l);
    this.delagate = PacketFormatter.registry.get(formatType).newInstance(
        this.platformFormatter, this.out, this.locale);
  }
View Full Code Here

        if (this.length == 1)
            suffix = "";
        else
            suffix = "s";
        final StringBuilder sb = new StringBuilder();
        final Formatter formatter = new Formatter(sb, Locale.US);
        formatter.format("%d %s%s", this.length, this.units.getLongFormat(),
                suffix);
        return sb.toString();
    }
View Full Code Here

TOP

Related Classes of java.util.Formatter$FormatSpecifier$BigDecimalLayout

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.