/** * Creates a new instance indexed on the parameters with the specified name. * @param list a list of properties * @param parameterName the name of parameters on which to index */ public IndexedPropertyList(final PropertyList<Property> list, final String parameterName) { final Map<String, PropertyList<Property>> indexedProperties = new HashMap<String, PropertyList<Property>>(); list.forEach(property -> property.getParameters(parameterName).forEach(parameter -> { PropertyList<Property> properties = indexedProperties.get(parameter.getValue()); if (properties == null) { properties = new PropertyList<Property>(); indexedProperties.put(parameter.getValue(), properties); } properties.add(property); })); this.index = Collections.unmodifiableMap(indexedProperties); }
/** * Creates a new instance indexed on the parameters with the specified name. * @param list a list of properties * @param parameterName the name of parameters on which to index */ public IndexedPropertyList(final PropertyList<Property> list, final String parameterName) { final Map<String, PropertyList<Property>> indexedProperties = new HashMap<String, PropertyList<Property>>(); list.forEach(property -> property.getParameters(parameterName).forEach(parameter -> { PropertyList<Property> properties = indexedProperties.get(parameter.getValue()); if (properties == null) { properties = new PropertyList<Property>(); indexedProperties.put(parameter.getValue(), properties); } properties.add(property); })); this.index = Collections.unmodifiableMap(indexedProperties); }
exDateProperties.forEach(exDateProp -> {
/** * @throws IOException * @throws ParserException */ public void testTzIdCompatibility() throws IOException, ParserException { CalendarBuilder builder = new CalendarBuilder(); Calendar calendar = builder.build(getClass().getResourceAsStream("/samples/valid/tmeher.ics")); // ensure the calendar is loaded properly.. assertNotNull(calendar); TimeZoneRegistry registry = builder.getRegistry(); calendar.getComponents().forEach(calendarComponent -> { calendarComponent.getProperties().forEach(property -> { TzId tzId = property.getParameter(Parameter.TZID); if (tzId != null) { assertNotNull(registry.getTimeZone(tzId.getValue())); } }); }); } }