Examples of format()


Examples of net.bpiwowar.mg4j.extensions.utils.LoggerPrintStream.format()

    LoggerPrintStream out = new LoggerPrintStream(logger, Level.INFO);
    synchronized (tasks) {
      for (Task task : tasks) {
        i++;
        final int size = tasks.size();
        out.format("\t[%d/%d] ", i, size);
        task.print(ts, out);
        out.flush();
      }
    }
  }
View Full Code Here

Examples of net.greghaines.jesque.utils.CompositeDateFormat.format()

    }

    @Test
    public void testFormat() {
        final DateFormat dateFormat = new CompositeDateFormat();
        Assert.assertEquals("2013-03-08T02:26:05.234+0000", dateFormat.format(date));
    }

    private static void assertWithinASecond(final Date expected, final Date actual) {
        final double delta = expected.getTime() - actual.getTime();
        final String msg = "expected=" + expected + " actual=" + actual + " delta=" + delta;
View Full Code Here

Examples of net.milkbowl.vault.economy.Economy.format()

                if (portal.getPrice() != 0D && !p.hasPermission(portal.getExempt())) {
                    shouldPay = true;
                    if (portal.getPrice() < 0D || (vaultEco != null && vaultEco.has(p.getName(), portal.getPrice())) || (bank != null && bank.hasEnough(event.getPlayer(), portal.getPrice(), portal.getCurrency(), "You need " + bank.getFormattedAmount(event.getPlayer(), portal.getPrice(), portal.getCurrency()) + " to enter the " + portal.getName() + " portal."))) {
                        canAfford = true;
                    } else if (vaultEco != null) {
                        p.sendMessage("You need " + vaultEco.format(portal.getPrice()) + " to enter the " + portal.getName() + " portal.");
                        event.setCancelled(true);
                        return;
                    } else if (bank != null) {
                        event.setCancelled(true);
                        return;
View Full Code Here

Examples of net.rim.device.api.i18n.SimpleDateFormat.format()

        return _dateTimePicker.doModal();
    }
   
    public Object getSelectedValue() {
        SimpleDateFormat sdf = new SimpleDateFormat( _HTML5Calendar.getFormat().toString() );
        StringBuffer sb = sdf.format( _dateTimePicker.getDateTime(), new StringBuffer(16), null );
       
        return sb.toString();
    }
   
    private static int parseInt( String s, int from, int to ) {
View Full Code Here

Examples of net.sf.jabref.export.layout.LayoutFormatter.format()

    assertEquals("", layout.format("\\dag"));
    assertEquals("", layout.format("\\ddag"));
    assertEquals("", layout.format("\\S")); // �
    assertEquals("", layout.format("\\P")); // �
    assertEquals("", layout.format("\\copyright")); // �
    assertEquals("", layout.format("\\pounds")); // �
  }
}
View Full Code Here

Examples of net.sf.jabref.export.layout.format.AuthorAbbreviator.format()

  public void testFormat() {

    LayoutFormatter a = new AuthorLastFirstAbbreviator();
    LayoutFormatter b = new AuthorAbbreviator();

    assertEquals(b.format(""), a.format(""));
    assertEquals(b.format("Someone, Van Something"), a.format("Someone, Van Something"));
    assertEquals(b.format("Smith, John"), a.format("Smith, John"));
    assertEquals(b.format("von Neumann, John and Smith, John and Black Brown, Peter"), a
      .format("von Neumann, John and Smith, John and Black Brown, Peter"));
View Full Code Here

Examples of net.sf.jabref.export.layout.format.AuthorAndsCommaReplacer.format()

  public void testFormat() {

    LayoutFormatter a = new AuthorAndsCommaReplacer();
   
    // Empty case
    assertEquals("", a.format(""));

    // Single Names don't change
    assertEquals("Someone, Van Something", a.format("Someone, Van Something"));
   
    // Two names just an &
View Full Code Here

Examples of net.sf.jabref.export.layout.format.AuthorAndsReplacer.format()

   */
  public void testFormat() {
    LayoutFormatter a = new AuthorAndsReplacer();

    // Empty case
    assertEquals("", a.format(""));

    // Single Names don't change
    assertEquals("Someone, Van Something", a.format("Someone, Van Something"));

    // Two names just an &
View Full Code Here

Examples of net.sf.jabref.export.layout.format.AuthorFirstAbbrLastCommas.format()

  public void testFormat() {
    LayoutFormatter a = new AuthorFirstAbbrLastCommas();

    // Empty case
    assertEquals("", a.format(""));

    // Single Names
    assertEquals("V. S. Someone", a.format("Someone, Van Something"));

    // Two names
View Full Code Here

Examples of net.sf.jabref.export.layout.format.AuthorFirstAbbrLastOxfordCommas.format()

   */
  public void testFormat() {
    LayoutFormatter a = new AuthorFirstAbbrLastOxfordCommas();

    // Empty case
    assertEquals("", a.format(""));

    // Single Names
    assertEquals("V. S. Someone", a.format("Someone, Van Something"));

    // Two names
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.