Class Format.Context

java.lang.Object
eu.bandm.tools.format.Format.Context
All Implemented Interfaces:
Serializable
Enclosing class:
Format

public static class Format.Context extends Object implements Serializable
Realizes a map of bindings for a collection of Format.BoundVariables and Format.FreeVariables.
See Also:
  • Field Details

  • Constructor Details

    • Context

      public Context()
      Construct a new empty instance.
    • Context

      public Context(Formattable... args)
      Construct a new instance with the arguments as the bindings for the first positions of Format.BoundVariables.
    • Context

      public Context(String name, Formattable value)
      Construct a new instance with one binding of a named Format.BoundVariable.
  • Method Details

    • put

      public void put(String name, Formattable value)
      Add or overwrite a binding for a Format.FreeVariable.
    • eval

      public Format.Context eval(Format.Context outer, boolean partial)
      Evaluates all values bound in this Context (ONLY TO FreeVariable ??) against the outer context given as parameter. If partial==false, they must completely be resolvable or else an Exception is thrown. Only if partial==true, the bindings of the outer context are copied to the result. The positional bindings of the outer context are appened to this context. FIXME???????
    • getFreeValues

      public Map<String,Formattable> getFreeValues()
      Getter used by diagnosis.
    • getArguments

      public List<Formattable> getArguments()
      Getter used by diagnosis.