Package java.text

Examples of java.text.NumberFormat.format()


        NumberFormat format = NumberFormat.getInstance();
        format.setMinimumFractionDigits(2);
        format.setMaximumFractionDigits(2);

        mLog.debug("Getting the supported extensions of the IfilterPreparator took "
            + format.format(duration) + " secs");
      }
    }

    return mExtensionArr;
  }
View Full Code Here


     
      String[] vals=val.split(",");
      for (int i=0;i<vals.length;++i){
        if (vals[i]!=null && vals[i].length()>0){
          if (format!=null){
            vals[i]=format.format(Double.parseDouble(vals[i]));
          }
          doc.add(new Field(name,vals[i],Field.Store.NO,Field.Index.NOT_ANALYZED,Field.TermVector.NO));
        }
      } 
    }
View Full Code Here

        NumberFormat format = NumberFormat.getInstance();
        format.setMinimumFractionDigits(2);
        format.setMaximumFractionDigits(2);

        mLog.debug("..." + toCommand(commandArr) + " finished ("
            + format.format(duration) + " secs)");
      }

      if (exitCode != 0) {
        throw new RegainException("Native command exited with exit code "
            + exitCode + ": '" + toCommand(commandArr) + "'");
View Full Code Here

      int d2 = thisYear % 100;

      NumberFormat f = new DecimalFormat("00");
     
      for (int i = 0; i <= 30; i++){
        assertTrue("" + i, thisYear <= Integer.parseInt(Util.toFourDigitYear(f.format((d2 + i) % 100))));
      }
      for (int i = 0; i < 70; i++){
        assertTrue("" + i, thisYear >= Integer.parseInt(Util.toFourDigitYear(f.format((d2 - i + 100) % 100))));
      }
    }
View Full Code Here

     
      for (int i = 0; i <= 30; i++){
        assertTrue("" + i, thisYear <= Integer.parseInt(Util.toFourDigitYear(f.format((d2 + i) % 100))));
      }
      for (int i = 0; i < 70; i++){
        assertTrue("" + i, thisYear >= Integer.parseInt(Util.toFourDigitYear(f.format((d2 - i + 100) % 100))));
      }
    }
   
    public void testToMonthNumber(){
View Full Code Here

        {
            final NumberFormat nbrFmt = NumberFormat.getNumberInstance();

            Object[] args = new Object[] {
                Integer.valueOf(statementCount),
                nbrFmt.format(totalLength),
                nbrFmt.format(executionLength),
                nbrFmt.format(outputLength)
            };

            //i18n[SQLResultExecuterPanel.scriptQueryStatistics=Executed {0}
View Full Code Here

            final NumberFormat nbrFmt = NumberFormat.getNumberInstance();

            Object[] args = new Object[] {
                Integer.valueOf(statementCount),
                nbrFmt.format(totalLength),
                nbrFmt.format(executionLength),
                nbrFmt.format(outputLength)
            };

            //i18n[SQLResultExecuterPanel.scriptQueryStatistics=Executed {0}
            //queries; elapsed time (seconds) - Total: {1}, SQL query: {2},
View Full Code Here

            Object[] args = new Object[] {
                Integer.valueOf(statementCount),
                nbrFmt.format(totalLength),
                nbrFmt.format(executionLength),
                nbrFmt.format(outputLength)
            };

            //i18n[SQLResultExecuterPanel.scriptQueryStatistics=Executed {0}
            //queries; elapsed time (seconds) - Total: {1}, SQL query: {2},
            //Building output: {3}]
View Full Code Here

            Object[] args = new Object[] {
                    Integer.valueOf(processedStatementCount),
                    Integer.valueOf(statementCount),
                    numberResultRowsRead == null ? 0: numberResultRowsRead,
                    nbrFmt.format(totalLength),
                    nbrFmt.format(executionLength),
                    nbrFmt.format(outputLength)
            };

            //i18n[SQLResultExecuterPanel.queryStatistics=Query {0} of {1}
View Full Code Here

            Object[] args = new Object[] {
                    Integer.valueOf(processedStatementCount),
                    Integer.valueOf(statementCount),
                    numberResultRowsRead == null ? 0: numberResultRowsRead,
                    nbrFmt.format(totalLength),
                    nbrFmt.format(executionLength),
                    nbrFmt.format(outputLength)
            };

            //i18n[SQLResultExecuterPanel.queryStatistics=Query {0} of {1}
            //elapsed time (seconds) - Total: {2}, SQL query: {3},
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.