Exemplo n.º 1
0
 /** {@inheritDoc} */
 public final boolean equals(final Object arg0) {
   if (arg0 instanceof Calendar) {
     final Calendar calendar = (Calendar) arg0;
     return new EqualsBuilder()
         .append(getProperties(), calendar.getProperties())
         .append(getComponents(), calendar.getComponents())
         .isEquals();
   }
   return super.equals(arg0);
 }
Exemplo n.º 2
0
  /**
   * Creates a deep copy of the specified calendar.
   *
   * @param c the calendar to copy
   * @throws IOException where an error occurs reading calendar data
   * @throws ParseException where calendar parsing fails
   * @throws URISyntaxException where an invalid URI string is encountered
   */
  public Calendar(Calendar c) throws ParseException, IOException, URISyntaxException {

    this(
        new PropertyList(c.getProperties()),
        new ComponentList<CalendarComponent>(c.getComponents()));
  }