javadoc/checkstyle changes only

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@634096 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Niall Pemberton 2008-03-06 00:58:11 +00:00
parent 52a903c691
commit 8e83403ba9
2 changed files with 81 additions and 43 deletions

View File

@ -55,8 +55,10 @@ import org.apache.commons.lang.Validate;
* *
* <p>Limitations inherited from <code>java.text.MessageFormat</code>: * <p>Limitations inherited from <code>java.text.MessageFormat</code>:
* <ul> * <ul>
* <li>When using "choice" subformats, support for nested formatting instructions is limited to that provided by the base class.</li> * <li>When using "choice" subformats, support for nested formatting instructions is limited
* <li>Thread-safety of <code>Format</code>s, including <code>MessageFormat</code> and thus <code>ExtendedMessageFormat</code>, is not guaranteed.</li> * to that provided by the base class.</li>
* <li>Thread-safety of <code>Format</code>s, including <code>MessageFormat</code> and thus
* <code>ExtendedMessageFormat</code>, is not guaranteed.</li>
* </ul> * </ul>
* </p> * </p>
* *
@ -281,7 +283,8 @@ public class ExtendedMessageFormat extends MessageFormat {
try { try {
return Integer.parseInt(result.toString()); return Integer.parseInt(result.toString());
} catch (NumberFormatException e) { } catch (NumberFormatException e) {
//we've already ensured only digits, so unless something outlandishly large was specified we should be okay. // we've already ensured only digits, so unless something
// outlandishly large was specified we should be okay.
} }
} }
error = !Character.isDigit(c); error = !Character.isDigit(c);
@ -332,8 +335,7 @@ public class ExtendedMessageFormat extends MessageFormat {
* Insert formats back into the pattern for toPattern() support. * Insert formats back into the pattern for toPattern() support.
* *
* @param pattern source * @param pattern source
* @param formats the Formats to insert * @param customPatterns The custom patterns to re-insert, if any
* @param metaFormat Format to format the Formats
* @return full pattern * @return full pattern
*/ */
private String insertFormats(String pattern, ArrayList customPatterns) { private String insertFormats(String pattern, ArrayList customPatterns) {

View File

@ -29,12 +29,15 @@ import java.util.TimeZone;
* <p>A suite of utilities surrounding the use of the * <p>A suite of utilities surrounding the use of the
* {@link java.util.Calendar} and {@link java.util.Date} object.</p> * {@link java.util.Calendar} and {@link java.util.Date} object.</p>
* *
* <p>DateUtils contains a lot of common methods considering manipulations of Dates or Calendars. * <p>DateUtils contains a lot of common methods considering manipulations
* Some methods require some extra explanation. * of Dates or Calendars. Some methods require some extra explanation.
* The truncate and round methods could be considered the Math.floor(), Math.ceil() or Math.round versions for dates * The truncate and round methods could be considered the Math.floor(),
* Math.ceil() or Math.round versions for dates
* This way date-fields will be ignored in bottom-up order. * This way date-fields will be ignored in bottom-up order.
* As a complement to these methods we've introduced some fragment-methods. With these methods the Date-fields will be ignored in top-down order. * As a complement to these methods we've introduced some fragment-methods.
* Since a date without a year is not a valid date, you have to decide in what kind of date-field you want your result, for instance milliseconds or days. * With these methods the Date-fields will be ignored in top-down order.
* Since a date without a year is not a valid date, you have to decide in what
* kind of date-field you want your result, for instance milliseconds or days.
* </p> * </p>
* *
* *
@ -1069,7 +1072,8 @@ public class DateUtils {
* <li>January 1, 2008 7:15:10.538 with Calendar.SECOND as fragment will return 538</li> * <li>January 1, 2008 7:15:10.538 with Calendar.SECOND as fragment will return 538</li>
* <li>January 6, 2008 7:15:10.538 with Calendar.SECOND as fragment will return 538</li> * <li>January 6, 2008 7:15:10.538 with Calendar.SECOND as fragment will return 538</li>
* <li>January 6, 2008 7:15:10.538 with Calendar.MINUTE as fragment will return 10538 (10*1000 + 538)</li> * <li>January 6, 2008 7:15:10.538 with Calendar.MINUTE as fragment will return 10538 (10*1000 + 538)</li>
* <li>January 16, 2008 7:15:10.538 with Calendar.MILLISECOND as fragment will return 0 (a millisecond cannot be split in milliseconds)</li> * <li>January 16, 2008 7:15:10.538 with Calendar.MILLISECOND as fragment will return 0
* (a millisecond cannot be split in milliseconds)</li>
* </ul> * </ul>
* </p> * </p>
* *
@ -1102,10 +1106,14 @@ public class DateUtils {
* *
* <p> * <p>
* <ul> * <ul>
* <li>January 1, 2008 7:15:10.538 with Calendar.MINUTE as fragment will return 10 (equivalent to deprecated date.getSeconds())</li> * <li>January 1, 2008 7:15:10.538 with Calendar.MINUTE as fragment will return 10
* <li>January 6, 2008 7:15:10.538 with Calendar.MINUTE as fragment will return 10 (equivalent to deprecated date.getSeconds())</li> * (equivalent to deprecated date.getSeconds())</li>
* <li>January 6, 2008 7:15:10.538 with Calendar.DAY_OF_YEAR as fragment will return 26110 (7*3600 + 15*60 + 10)</li> * <li>January 6, 2008 7:15:10.538 with Calendar.MINUTE as fragment will return 10
* <li>January 16, 2008 7:15:10.538 with Calendar.MILLISECOND as fragment will return 0 (a millisecond cannot be split in seconds)</li> * (equivalent to deprecated date.getSeconds())</li>
* <li>January 6, 2008 7:15:10.538 with Calendar.DAY_OF_YEAR as fragment will return 26110
* (7*3600 + 15*60 + 10)</li>
* <li>January 16, 2008 7:15:10.538 with Calendar.MILLISECOND as fragment will return 0
* (a millisecond cannot be split in seconds)</li>
* </ul> * </ul>
* </p> * </p>
* *
@ -1138,11 +1146,14 @@ public class DateUtils {
* *
* <p> * <p>
* <ul> * <ul>
* <li>January 1, 2008 7:15:10.538 with Calendar.HOUR_OF_DAY as fragment will return 15 (equivalent to deprecated date.getMinutes())</li> * <li>January 1, 2008 7:15:10.538 with Calendar.HOUR_OF_DAY as fragment will return 15
* <li>January 6, 2008 7:15:10.538 with Calendar.HOUR_OF_DAY as fragment will return 15 (equivalent to deprecated date.getMinutes())</li> * (equivalent to deprecated date.getMinutes())</li>
* <li>January 6, 2008 7:15:10.538 with Calendar.HOUR_OF_DAY as fragment will return 15
* (equivalent to deprecated date.getMinutes())</li>
* <li>January 1, 2008 7:15:10.538 with Calendar.MONTH as fragment will return 15</li> * <li>January 1, 2008 7:15:10.538 with Calendar.MONTH as fragment will return 15</li>
* <li>January 6, 2008 7:15:10.538 with Calendar.MONTH as fragment will return 435 (7*60 + 15)</li> * <li>January 6, 2008 7:15:10.538 with Calendar.MONTH as fragment will return 435 (7*60 + 15)</li>
* <li>January 16, 2008 7:15:10.538 with Calendar.MILLISECOND as fragment will return 0 (a millisecond cannot be split in minutes)</li> * <li>January 16, 2008 7:15:10.538 with Calendar.MILLISECOND as fragment will return 0
* (a millisecond cannot be split in minutes)</li>
* </ul> * </ul>
* </p> * </p>
* *
@ -1175,11 +1186,14 @@ public class DateUtils {
* *
* <p> * <p>
* <ul> * <ul>
* <li>January 1, 2008 7:15:10.538 with Calendar.DAY_OF_YEAR as fragment will return 7 (equivalent to deprecated date.getHours())</li> * <li>January 1, 2008 7:15:10.538 with Calendar.DAY_OF_YEAR as fragment will return 7
* <li>January 6, 2008 7:15:10.538 with Calendar.DAY_OF_YEAR as fragment will return 7 (equivalent to deprecated date.getHours())</li> * (equivalent to deprecated date.getHours())</li>
* <li>January 6, 2008 7:15:10.538 with Calendar.DAY_OF_YEAR as fragment will return 7
* (equivalent to deprecated date.getHours())</li>
* <li>January 1, 2008 7:15:10.538 with Calendar.MONTH as fragment will return 7</li> * <li>January 1, 2008 7:15:10.538 with Calendar.MONTH as fragment will return 7</li>
* <li>January 6, 2008 7:15:10.538 with Calendar.MONTH as fragment will return 127 (5*24 + 7)</li> * <li>January 6, 2008 7:15:10.538 with Calendar.MONTH as fragment will return 127 (5*24 + 7)</li>
* <li>January 16, 2008 7:15:10.538 with Calendar.MILLISECOND as fragment will return 0 (a millisecond cannot be split in hours)</li> * <li>January 16, 2008 7:15:10.538 with Calendar.MILLISECOND as fragment will return 0
* (a millisecond cannot be split in hours)</li>
* </ul> * </ul>
* </p> * </p>
* *
@ -1212,11 +1226,14 @@ public class DateUtils {
* *
* <p> * <p>
* <ul> * <ul>
* <li>January 28, 2008 with Calendar.MONTH as fragment will return 28 (equivalent to deprecated date.getDay())</li> * <li>January 28, 2008 with Calendar.MONTH as fragment will return 28
* <li>February 28, 2008 with Calendar.MONTH as fragment will return 28 (equivalent to deprecated date.getDay())</li> * (equivalent to deprecated date.getDay())</li>
* <li>February 28, 2008 with Calendar.MONTH as fragment will return 28
* (equivalent to deprecated date.getDay())</li>
* <li>January 28, 2008 with Calendar.YEAR as fragment will return 28</li> * <li>January 28, 2008 with Calendar.YEAR as fragment will return 28</li>
* <li>February 28, 2008 with Calendar.YEAR as fragment will return 59</li> * <li>February 28, 2008 with Calendar.YEAR as fragment will return 59</li>
* <li>January 28, 2008 with Calendar.MILLISECOND as fragment will return 0 (a millisecond cannot be split in days)</li> * <li>January 28, 2008 with Calendar.MILLISECOND as fragment will return 0
* (a millisecond cannot be split in days)</li>
* </ul> * </ul>
* </p> * </p>
* *
@ -1249,10 +1266,14 @@ public class DateUtils {
* *
* <p> * <p>
* <ul> * <ul>
* <li>January 1, 2008 7:15:10.538 with Calendar.SECOND as fragment will return 538 (equivalent to calendar.get(Calendar.MILLISECOND))</li> * <li>January 1, 2008 7:15:10.538 with Calendar.SECOND as fragment will return 538
* <li>January 6, 2008 7:15:10.538 with Calendar.SECOND as fragment will return 538 (equivalent to calendar.get(Calendar.MILLISECOND))</li> * (equivalent to calendar.get(Calendar.MILLISECOND))</li>
* <li>January 6, 2008 7:15:10.538 with Calendar.MINUTE as fragment will return 10538 (10*1000 + 538)</li> * <li>January 6, 2008 7:15:10.538 with Calendar.SECOND as fragment will return 538
* <li>January 16, 2008 7:15:10.538 with Calendar.MILLISECOND as fragment will return 0 (a millisecond cannot be split in milliseconds)</li> * (equivalent to calendar.get(Calendar.MILLISECOND))</li>
* <li>January 6, 2008 7:15:10.538 with Calendar.MINUTE as fragment will return 10538
* (10*1000 + 538)</li>
* <li>January 16, 2008 7:15:10.538 with Calendar.MILLISECOND as fragment will return 0
* (a millisecond cannot be split in milliseconds)</li>
* </ul> * </ul>
* </p> * </p>
* *
@ -1284,10 +1305,14 @@ public class DateUtils {
* *
* <p> * <p>
* <ul> * <ul>
* <li>January 1, 2008 7:15:10.538 with Calendar.MINUTE as fragment will return 10 (equivalent to calendar.get(Calendar.SECOND))</li> * <li>January 1, 2008 7:15:10.538 with Calendar.MINUTE as fragment will return 10
* <li>January 6, 2008 7:15:10.538 with Calendar.MINUTE as fragment will return 10 (equivalent to calendar.get(Calendar.SECOND))</li> * (equivalent to calendar.get(Calendar.SECOND))</li>
* <li>January 6, 2008 7:15:10.538 with Calendar.DAY_OF_YEAR as fragment will return 26110 (7*3600 + 15*60 + 10)</li> * <li>January 6, 2008 7:15:10.538 with Calendar.MINUTE as fragment will return 10
* <li>January 16, 2008 7:15:10.538 with Calendar.MILLISECOND as fragment will return 0 (a millisecond cannot be split in seconds)</li> * (equivalent to calendar.get(Calendar.SECOND))</li>
* <li>January 6, 2008 7:15:10.538 with Calendar.DAY_OF_YEAR as fragment will return 26110
* (7*3600 + 15*60 + 10)</li>
* <li>January 16, 2008 7:15:10.538 with Calendar.MILLISECOND as fragment will return 0
* (a millisecond cannot be split in seconds)</li>
* </ul> * </ul>
* </p> * </p>
* *
@ -1320,11 +1345,14 @@ public class DateUtils {
* *
* <p> * <p>
* <ul> * <ul>
* <li>January 1, 2008 7:15:10.538 with Calendar.HOUR_OF_DAY as fragment will return 15 (equivalent to calendar.get(Calendar.MINUTES))</li> * <li>January 1, 2008 7:15:10.538 with Calendar.HOUR_OF_DAY as fragment will return 15
* <li>January 6, 2008 7:15:10.538 with Calendar.HOUR_OF_DAY as fragment will return 15 (equivalent to calendar.get(Calendar.MINUTES))</li> * (equivalent to calendar.get(Calendar.MINUTES))</li>
* <li>January 6, 2008 7:15:10.538 with Calendar.HOUR_OF_DAY as fragment will return 15
* (equivalent to calendar.get(Calendar.MINUTES))</li>
* <li>January 1, 2008 7:15:10.538 with Calendar.MONTH as fragment will return 15</li> * <li>January 1, 2008 7:15:10.538 with Calendar.MONTH as fragment will return 15</li>
* <li>January 6, 2008 7:15:10.538 with Calendar.MONTH as fragment will return 435 (7*60 + 15)</li> * <li>January 6, 2008 7:15:10.538 with Calendar.MONTH as fragment will return 435 (7*60 + 15)</li>
* <li>January 16, 2008 7:15:10.538 with Calendar.MILLISECOND as fragment will return 0 (a millisecond cannot be split in minutes)</li> * <li>January 16, 2008 7:15:10.538 with Calendar.MILLISECOND as fragment will return 0
* (a millisecond cannot be split in minutes)</li>
* </ul> * </ul>
* </p> * </p>
* *
@ -1357,11 +1385,14 @@ public class DateUtils {
* *
* <p> * <p>
* <ul> * <ul>
* <li>January 1, 2008 7:15:10.538 with Calendar.DAY_OF_YEAR as fragment will return 7 (equivalent to calendar.get(Calendar.HOUR_OF_DAY))</li> * <li>January 1, 2008 7:15:10.538 with Calendar.DAY_OF_YEAR as fragment will return 7
* <li>January 6, 2008 7:15:10.538 with Calendar.DAY_OF_YEAR as fragment will return 7 (equivalent to calendar.get(Calendar.HOUR_OF_DAY))</li> * (equivalent to calendar.get(Calendar.HOUR_OF_DAY))</li>
* <li>January 6, 2008 7:15:10.538 with Calendar.DAY_OF_YEAR as fragment will return 7
* (equivalent to calendar.get(Calendar.HOUR_OF_DAY))</li>
* <li>January 1, 2008 7:15:10.538 with Calendar.MONTH as fragment will return 7</li> * <li>January 1, 2008 7:15:10.538 with Calendar.MONTH as fragment will return 7</li>
* <li>January 6, 2008 7:15:10.538 with Calendar.MONTH as fragment will return 127 (5*24 + 7)</li> * <li>January 6, 2008 7:15:10.538 with Calendar.MONTH as fragment will return 127 (5*24 + 7)</li>
* <li>January 16, 2008 7:15:10.538 with Calendar.MILLISECOND as fragment will return 0 (a millisecond cannot be split in hours)</li> * <li>January 16, 2008 7:15:10.538 with Calendar.MILLISECOND as fragment will return 0
* (a millisecond cannot be split in hours)</li>
* </ul> * </ul>
* </p> * </p>
* *
@ -1394,11 +1425,16 @@ public class DateUtils {
* *
* <p> * <p>
* <ul> * <ul>
* <li>January 28, 2008 with Calendar.MONTH as fragment will return 28 (equivalent to calendar.get(Calendar.DAY_OF_MONTH))</li> * <li>January 28, 2008 with Calendar.MONTH as fragment will return 28
* <li>February 28, 2008 with Calendar.MONTH as fragment will return 28 (equivalent to calendar.get(Calendar.DAY_OF_MONTH))</li> * (equivalent to calendar.get(Calendar.DAY_OF_MONTH))</li>
* <li>January 28, 2008 with Calendar.YEAR as fragment will return 28 (equivalent to calendar.get(Calendar.DAY_OF_YEAR))</li> * <li>February 28, 2008 with Calendar.MONTH as fragment will return 28
* <li>February 28, 2008 with Calendar.YEAR as fragment will return 59 (equivalent to calendar.get(Calendar.DAY_OF_YEAR))</li> * (equivalent to calendar.get(Calendar.DAY_OF_MONTH))</li>
* <li>January 28, 2008 with Calendar.MILLISECOND as fragment will return 0 (a millisecond cannot be split in days)</li> * <li>January 28, 2008 with Calendar.YEAR as fragment will return 28
* (equivalent to calendar.get(Calendar.DAY_OF_YEAR))</li>
* <li>February 28, 2008 with Calendar.YEAR as fragment will return 59
* (equivalent to calendar.get(Calendar.DAY_OF_YEAR))</li>
* <li>January 28, 2008 with Calendar.MILLISECOND as fragment will return 0
* (a millisecond cannot be split in days)</li>
* </ul> * </ul>
* </p> * </p>
* *