Package org.freeplane.features.format

Examples of org.freeplane.features.format.PatternFormat.formatObject()


  private void testOnePattern(String pattern) {
    final PatternFormat formatter = PatternFormat.guessPatternFormat(pattern);
    assertNotNull("could not create a formatter for pattern " + pattern, formatter);
    if (formatter.acceptsDate())
      System.err.println(pattern + "->" + formatter.formatObject(new Date()));
    else if (formatter.acceptsNumber())
      System.err.println(pattern + "->" + formatter.formatObject(1223.456789));
    else
      System.err.println(pattern + "->" + formatter.formatObject("Hello world!"));
  }
View Full Code Here


    final PatternFormat formatter = PatternFormat.guessPatternFormat(pattern);
    assertNotNull("could not create a formatter for pattern " + pattern, formatter);
    if (formatter.acceptsDate())
      System.err.println(pattern + "->" + formatter.formatObject(new Date()));
    else if (formatter.acceptsNumber())
      System.err.println(pattern + "->" + formatter.formatObject(1223.456789));
    else
      System.err.println(pattern + "->" + formatter.formatObject("Hello world!"));
  }

  private void assertMatches(final Pattern pattern, String string) {
View Full Code Here

    if (formatter.acceptsDate())
      System.err.println(pattern + "->" + formatter.formatObject(new Date()));
    else if (formatter.acceptsNumber())
      System.err.println(pattern + "->" + formatter.formatObject(1223.456789));
    else
      System.err.println(pattern + "->" + formatter.formatObject("Hello world!"));
  }

  private void assertMatches(final Pattern pattern, String string) {
    final Matcher m = pattern.matcher(string);
    final boolean matches = m.find();
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.