Examples of format()


Examples of games.stendhal.client.FormatTextParserExtension.format()

   */
  @Test
  public void testFormat() throws Exception {
    StringBuilder builder = new StringBuilder();
    FormatTextParser parser = new FormatTextParserExtension(builder);
    parser.format("##text");
  }



}
View Full Code Here

Examples of games.stendhal.client.gui.FormatTextParser.format()

    try {
      // recreate the string without the # characters
      final StringBuilder temp = new StringBuilder();
      FormatTextParser parser = new FormatTextParserExtension(temp);
      parser.format(line);

      // create the attribute string including formating
      final AttributedString aStyledText = new AttributedString(temp.toString());

      parser = new FormatTextParser() {
View Full Code Here

Examples of hirondelle.date4j.DateTime.format()

    /**
     * What is the current date-time in the JRE's default time zone?
     */
    public static void currentDateTime () {
        DateTime now = DateTime.now( TimeZone.getDefault() );
        String result = now.format( "YYYY-MM-DD hh:mm:ss" );
        log( "Current date-time in default time zone : " + result );
    }

    /**
     * What is the current date-time in Cairo (include weekday)?
View Full Code Here

Examples of hirondelle.web4j.model.DateTime.format()

    if (
      dateTime.unitsAllPresent(Unit.YEAR, Unit.MONTH, Unit.DAY) &&
      dateTime.unitsAllAbsent(Unit.HOUR, Unit.MINUTE, Unit.SECOND)
    ){
      fLogger.finest("Treating DateTime as a date (year-month-day).");
      formattedDateTime = dateTime.format(DbConfig.getDateFormat(fSqlId.getDatabaseName()));
    }
    else if (
      dateTime.unitsAllAbsent(Unit.YEAR, Unit.MONTH, Unit.DAY) &&
      dateTime.unitsAllPresent(Unit.HOUR, Unit.MINUTE, Unit.SECOND)
    ){
View Full Code Here

Examples of htsjdk.samtools.util.FormatUtil.format()

                        out.println(interval.getSequence() + "\t" +
                                    interval.getStart() + "\t" +
                                    interval.getEnd() + "\t" +
                                    interval.length() + "\t" +
                                    interval.getName() + "\t" +
                                    fmt.format(gcDouble) + "\t" +
                                    fmt.format(coverage) + "\t" +
                                    fmt.format(coverage / this.metrics.MEAN_TARGET_COVERAGE)
                        );
                    }
                }
View Full Code Here

Examples of info.cukes.editor.FeatureEditor.format()

public class FormatHandler extends AbstractHandler {

    @Override
    public Object execute(ExecutionEvent event) throws ExecutionException {
        FeatureEditor editor = (FeatureEditor) HandlerUtil.getActiveEditor(event);
        editor.format();

        return null;
    }
}
View Full Code Here

Examples of io.tesla.lifecycle.profiler.internal.DefaultTimer.format()

  @Test
  public void testTimeFormats() throws Exception {

    Timer timer = new DefaultTimer();
    Assert.assertEquals("1ms", timer.format(1));
    Assert.assertEquals("1s 1ms", timer.format(1001));
    Assert.assertEquals("1m 1s", timer.format(61 * MS_PER_SEC));
  }

  @Test
View Full Code Here

Examples of is.us.formatters.USPersidnoFormatter.format()

  public void formatting() {
    String input = "0911794829";
    String expected = "091179-4829";

    USPersidnoFormatter formatter = new USPersidnoFormatter();
    assertEquals( formatter.format( input ), expected );
    assertEquals( formatter.format( null ), "" );
  }
}
View Full Code Here

Examples of it.eng.spago.dbaccess.EngDateFormatter.format()

            return null;
        } // if (stringDateValue == null)
        Date result = null;
        try {
            EngDateFormatter engDateFormatter = new EngDateFormatter(Configurator.getInstance().getDateFormat());
            engDateFormatter.format(stringDateValue);
            int day = (engDateFormatter.getDay() != -1 ? engDateFormatter.getDay() : 0);
            int month = (engDateFormatter.getMonth() != -1 ? engDateFormatter.getMonth() : 0);
            int year = (engDateFormatter.getYear() != -1 ? engDateFormatter.getYear() : 0);
            result = new Date(year - 1900, month - 1, day);
        } // try
View Full Code Here

Examples of java.io.Console.format()

        String propertyValue = props.getProperty(propertyName);
        if (StringUtil.isBlank(propertyValue)) {

            // prompt for the property value
            Console console = System.console();
            console.format("\nThe [%s] property is required but not set in [%s].\n", propertyName, propertiesFileName);
            console.format("Do you want to set [%s] value now?\n", propertyName);
            String response = "";
            while (!(response.startsWith("n") || response.startsWith("y"))) {
                response = String.valueOf(console.readLine("%s", "yes|no: ")).toLowerCase();
            }
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.