com.arsdigita.xml
Interface Formatter
- All Known Implementing Classes:
- DateFormatter, DateTimeFormatter, TimeFormatter
- public interface Formatter
An interface providing an API for converting an object
to a string. Thus instead of doing
Date today = new Date();
element.addAttribute("today", date.toString());
we can do:
Date today = new Date();
element.addAttribute("today", XML.format(date));
Or if you require a non-default format:
Date today = new Date();
element.addAttribute("today", new DateTimeFormatter.format(today));
format
public String format(Object value)
Copyright (c) 2004 Red Hat, Inc. Corporation. All Rights Reserved. Generated at July 21 2004:2337 UTC