Skip to content

A set of java.text.Format subclasses that instead positional notation uses tag names

Notifications You must be signed in to change notification settings

tizianolattisi/mapformat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

A set of java.text.Format subclasses that instead positional notation uses tag names.

Example:

String pattern = "${mydate,date,dd}/${mystring}/${mynumber,number,00}/";

Map<String, Object> map = new HashMap();
map.put("mydate", (new GregorianCalendar(2012, 9-1, 20)).getTime());
map.put("mystring", "That's all folks!");
map.put("mynumber", 7);

MessageMapFormat mmp = new MessageMapFormat(pattern);

String result = mmp.format(map);          // "20/That's all folks!/07/

About

A set of java.text.Format subclasses that instead positional notation uses tag names

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages