public class StringMapCompositor extends Object implements ValuesArrayBinder<StringMapCompositor,String>
The template is simply an array of string values, where odd indices represent literals, and even indices represent token positions. If the token positions contains words, then these can be used as keys for looking up values in an associated map. If not, then values are simply positional, in which case simple numerals are used as indices for debugging purposes, although they are not referenced during string interpolation.
| Constructor and Description |
|---|
StringMapCompositor(String template)
Create a string template which has positional tokens, in "{}" form.
|
| Modifier and Type | Method and Description |
|---|---|
String |
bindValues(StringMapCompositor context,
Object[] values)
Using context instance of type T, AKA the template, create and bind values to
target object of type R
|
public StringMapCompositor(String template)
template - The string templatepublic String bindValues(StringMapCompositor context, Object[] values)
ValuesArrayBinderbindValues in interface ValuesArrayBinder<StringMapCompositor,String>context - A context object that knows how to provide an instance of type Rvalues - An array of values which should be bound to the new R instanceCopyright © 2018. All rights reserved.