src/net/fortuna/ical4j/model/DateList.java

changeset 3
73bdfa70b04e
parent 0
fb9019fb1bf7
child 4
45d57ecba757
equal deleted inserted replaced
0:8c6f166bd0be 1:c18af98a85af
193 /** 193 /**
194 * Add a date to the list. The date will be updated to reflect the 194 * Add a date to the list. The date will be updated to reflect the
195 * timezone of this list. 195 * timezone of this list.
196 * @param date the date to add 196 * @param date the date to add
197 * @return true 197 * @return true
198 * @see List#add(java.lang.Object) 198 * @see java.util.List#add(Object)
199 */ 199 */
200 public final boolean add(final Date date) { 200 public final boolean add(final Date date) {
201 if (date instanceof DateTime) { 201 if (date instanceof DateTime) {
202 if (isUtc()) { 202 if (isUtc()) {
203 ((DateTime) date).setUtc(true); 203 ((DateTime) date).setUtc(true);
217 /** 217 /**
218 * Overrides superclass to throw an <code>IllegalArgumentException</code> 218 * Overrides superclass to throw an <code>IllegalArgumentException</code>
219 * Where argument is not a <code>net.fortuna.ical4j.model.Date</code>. 219 * Where argument is not a <code>net.fortuna.ical4j.model.Date</code>.
220 * @param date the date to add 220 * @param date the date to add
221 * @return true if the object was added, otherwise false 221 * @return true if the object was added, otherwise false
222 * @see List#add(E) 222 * @see java.util.List#add(Object)
223 */ 223 */
224 public final boolean add(final Object date) { 224 public final boolean add(final Object date) {
225 if (!(date instanceof Date)) { 225 if (!(date instanceof Date)) {
226 throw new IllegalArgumentException("Argument not a " + Date.class.getName()); 226 throw new IllegalArgumentException("Argument not a " + Date.class.getName());
227 } 227 }

mercurial