144 /** |
144 /** |
145 * Overrides superclass to throw an <code>IllegalArgumentException</code> |
145 * Overrides superclass to throw an <code>IllegalArgumentException</code> |
146 * where argument is not a <code>net.fortuna.ical4j.model.Period</code>. |
146 * where argument is not a <code>net.fortuna.ical4j.model.Period</code>. |
147 * @param period a period to add to the list |
147 * @param period a period to add to the list |
148 * @return true if the period was added, otherwise false |
148 * @return true if the period was added, otherwise false |
149 * @see java.util.List#add(E) |
149 * @see java.util.List#add(Object) |
150 */ |
150 */ |
151 public final boolean add(final Object period) { |
151 public final boolean add(final Object period) { |
152 if (!(period instanceof Period)) { |
152 if (!(period instanceof Period)) { |
153 throw new IllegalArgumentException("Argument not a " |
153 throw new IllegalArgumentException("Argument not a " |
154 + Period.class.getName()); |
154 + Period.class.getName()); |