Examples of FastMessageFormat


Examples of org.apache.myfaces.trinidadinternal.share.util.FastMessageFormat

    return clientId.replace(':','_');
  }

  public static String getFormattedString(String pattern, String[] parameters)
  {
    FastMessageFormat formatter = new FastMessageFormat(pattern);
    return formatter.format(parameters);
  }
View Full Code Here

Examples of org.apache.myfaces.trinidadinternal.share.util.FastMessageFormat

    return clientId.replace(':','_');
  }

  public static String getFormattedString(String pattern, String[] parameters)
  {
    FastMessageFormat formatter = new FastMessageFormat(pattern);
    return formatter.format(parameters);
  }
View Full Code Here

Examples of org.apache.myfaces.trinidadinternal.share.util.FastMessageFormat

      }

      String format = rc.getTranslatedString(formatKey);
      if (format != null)
      {
        FastMessageFormat fmf = new FastMessageFormat(format);
        linkText = fmf.format(srcs);
      }
    }

    _writeCellContents(context, rc, ttrc, hgrid, linkText, disabled, isTop, nextWindowStart);
  }
View Full Code Here

Examples of org.apache.myfaces.trinidadinternal.share.util.FastMessageFormat

    return clientId.replace(':','_');
  }

  public static String getFormattedString(String pattern, String[] parameters)
  {
    FastMessageFormat formatter = new FastMessageFormat(pattern);
    return formatter.format(parameters);
  }
View Full Code Here

Examples of org.apache.myfaces.trinidadinternal.share.util.FastMessageFormat

  static private final class FunctorMap extends AbstractMap<Object, String>
  {
    public FunctorMap(Object key)
    {
      // Assumes check against null above
      _format = new FastMessageFormat(key.toString());
    }
View Full Code Here

Examples of org.pentaho.reporting.libraries.formatting.FastMessageFormat

      this.time = time;
      final double rowsPerSec = (rowCount - this.lastRowCount) * 1000.0f / (deltaTime);
      this.lastRowCount = rowCount;
      if (logger.isDebugEnabled())
      {
        final FastMessageFormat messageFormat =
            new FastMessageFormat("{0} Rows: {1} ({2,number,0.000} rows/sec) ");
        logger.debug(new MemoryUsageMessage(messageFormat.format(
            new Object[]{message, rowCount, rowsPerSec})));
      }
    }
  }
View Full Code Here

Examples of org.pentaho.reporting.libraries.formatting.FastMessageFormat

    if (logger.isInfoEnabled() == false)
    {
      return;
    }

    final FastMessageFormat messageFormat =
        new FastMessageFormat("[{0}] Report Processing Finished: {1}ms - {2,number,0.000} rows/sec - ");

    final long processTime = System.currentTimeMillis() - startTime;
    final double rowsPerSecond = rowCount * 1000.0f / (processTime);
    logger.info(new MemoryUsageMessage
        (messageFormat.format(new Object[]{
            Thread.currentThread().getName(), new Long(processTime),
            new Double(rowsPerSecond)})));

  }
View Full Code Here

Examples of org.pentaho.reporting.libraries.formatting.FastMessageFormat

  public static String generateUniqueExpressionName(final DataSchema dataSchema,
                                                    final String pattern,
                                                    final String[] extraColumns) throws ReportProcessingException
  {
    final FastMessageFormat fastMessageFormat = new FastMessageFormat(pattern);
    if (fastMessageFormat.getSubFormatCount() == 0)
    {
      throw new IllegalArgumentException();
    }

    final HashSet<String> names = new HashSet<String>(Arrays.asList(dataSchema.getNames()));
    for (int i = 0; i < extraColumns.length; i++)
    {
      names.add(extraColumns[i]);
    }

    final Object[] data = new Object[1];
    int i = 0;
    // call me at any time if you have more than 32000 functions of the same name-pattern in a single report.
    while (i < Short.MAX_VALUE)
    {
      data[0] = IntegerCache.getInteger(i);
      final String s = fastMessageFormat.format(data);
      if (names.contains(s) == false)
      {
        return s;
      }
      i += 1;
View Full Code Here

Examples of org.pentaho.reporting.libraries.formatting.FastMessageFormat

  public static String generateUniqueExpressionName(final DataSchema dataSchema,
                                                    final String pattern,
                                                    final AbstractReportDefinition extraColumns)
      throws ReportProcessingException
  {
    final FastMessageFormat fastMessageFormat = new FastMessageFormat(pattern);
    if (fastMessageFormat.getSubFormatCount() == 0)
    {
      throw new IllegalArgumentException();
    }

    final HashSet<String> names = new HashSet<String>(Arrays.asList(dataSchema.getNames()));
    final Expression[] expressions = extraColumns.getExpressions().getExpressions();
    for (int i = 0; i < expressions.length; i++)
    {
      final Expression expression = expressions[i];
      names.add(expression.getName());
    }

    final Object[] data = new Object[1];
    int i = 0;
    // call me at any time if you have more than 32000 functions of the same name-pattern in a single report.
    while (i < Short.MAX_VALUE)
    {
      data[0] = IntegerCache.getInteger(i);
      final String s = fastMessageFormat.format(data);
      if (names.contains(s) == false)
      {
        return s;
      }
      i += 1;
View Full Code Here

Examples of org.pentaho.reporting.libraries.formatting.FastMessageFormat

  public FormattedCategoryAxis(final String label,
                               final String formatString,
                               final Locale locale)
  {
    super(label);
    format = new FastMessageFormat(formatString, locale);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.