Interface Formatter<T>

All Known Implementing Classes:
AgeFormatter, DateFormatter, DefaultLanguageListFormatter, FontFormatter, IPATranscriptFormatter, MediaSegmentFormatter, MsFormatter, NumberFormatter, OrthographyFormatter, StringFormatter, TableDataSourceFormatter, TierStringFormatter

public interface Formatter<T>
Base interface for implementing formatters. Formatters are classes that convert to/from a paticular type of object/string. Implementing classes should register their Formatter by adding the full class name to the file: META-INF/services/ca.phon.formatter.Formatter
  • Method Summary

    Modifier and Type
    Method
    Description
    format(T obj)
    Convert the given object into a formatted String.
    parse(String text)
    Parse the given string into a new object instance
  • Method Details

    • format

      String format(T obj)
      Convert the given object into a formatted String.
      Parameters:
      obj -
      Returns:
      formatted string
    • parse

      T parse(String text) throws ParseException
      Parse the given string into a new object instance
      Parameters:
      text -
      Returns:
      parsed object
      Throws:
      ParseException - if there was a problem parsing the given text