/** Add a value and mark as present. * * @param val */ @SuppressWarnings("unchecked") public void addValues(final Collection val) { if (!index.getMultiValued()) { throw new RuntimeException("org.bedework.icalendar.notmultivalued"); } if (newValues == null) { if (listField) { newValues = new ArrayList(); } else { newValues = new TreeSet(); } } present = true; newValues.addAll(val); }
/** Add a value and mark as present. * * @param val */ @SuppressWarnings("unchecked") public void addValue(final Object val) { if (!index.getMultiValued()) { throw new RuntimeException("org.bedework.icalendar.notmultivalued"); } if (newValues == null) { // TEMP = this needs to be in BwPropertyInfo //if (listField) { if (index == PropertyInfoIndex.XPROP) { newValues = new ArrayList(); } else { newValues = new TreeSet(); } } present = true; changed = true; newValues.add(val); }