Package eu.bandm.tools.format
Class Format.Context
java.lang.Object
eu.bandm.tools.format.Format.Context
- All Implemented Interfaces:
Serializable
- Enclosing class:
- Format
Realizes a map of bindings for a collection of
Format.BoundVariable
s
and Format.FreeVariable
s.- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionprotected final List<Formattable>
The bindings forFormat.BoundVariable
s, by their position index.protected final Map<String,
Formattable> The bindings forFormat.FreeVariable
s, by their name. -
Constructor Summary
ConstructorDescriptionContext()
Construct a new empty instance.Context
(Formattable... args) Construct a new instance with the arguments as the bindings for the first positions ofFormat.BoundVariable
s.Context
(String name, Formattable value) Construct a new instance with one binding of a namedFormat.BoundVariable
. -
Method Summary
Modifier and TypeMethodDescriptioneval
(Format.Context outer, boolean partial) Evaluates all values bound in this Context (ONLY TO FreeVariable ??) against the outer context given as parameter.Getter used by diagnosis.Getter used by diagnosis.void
put
(String name, Formattable value) Add or overwrite a binding for aFormat.FreeVariable
.
-
Field Details
-
freeValues
The bindings forFormat.FreeVariable
s, by their name. -
arguments
The bindings forFormat.BoundVariable
s, by their position index.
-
-
Constructor Details
-
Context
public Context()Construct a new empty instance. -
Context
Construct a new instance with the arguments as the bindings for the first positions ofFormat.BoundVariable
s. -
Context
Construct a new instance with one binding of a namedFormat.BoundVariable
.
-
-
Method Details
-
put
Add or overwrite a binding for aFormat.FreeVariable
. -
eval
Evaluates all values bound in this Context (ONLY TO FreeVariable ??) against the outer context given as parameter. Ifpartial==false
, they must completely be resolvable or else an Exception is thrown. Only ifpartial==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
Getter used by diagnosis. -
getArguments
Getter used by diagnosis.
-