Class SimpleFormatters.GetVar

java.lang.Object
monq.jfa.textparts.SimpleFormatters.GetVar
All Implemented Interfaces:
Formatter
Enclosing class:
SimpleFormatters

public static class SimpleFormatters.GetVar extends Object implements Formatter

implements a Formatter the format method of which inserts an element from a Map into the output.

  • Constructor Summary

    Constructors
    Constructor
    Description
    sets up a formatter that inserts retrieves key from the Map passed to format() and appends the result to the output.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    arranges (some of) the pieces of text found in st or m in an implementation dependend manner and appends them to out.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • GetVar

      public GetVar(String key)

      sets up a formatter that inserts retrieves key from the Map passed to format() and appends the result to the output. If the key is not found, nothing is appended.

  • Method Details

    • format

      public void format(StringBuilder out, TextStore sp, Map<Object,Object> m)
      Description copied from interface: Formatter

      arranges (some of) the pieces of text found in st or m in an implementation dependend manner and appends them to out. Depending on the implementation, both, st and m or even both may be allowed to be null.

      Postcondition: This method may not change the content of dest other than by appending to it.

      Specified by:
      format in interface Formatter