/** * Parses one or more CSV format fixing series files. * <p> * If the files contain a duplicate entry an exception will be thrown. * * @param charSources the fixing series CSV character sources * @return the loaded fixing series, mapped by {@linkplain ObservableId observable ID} * @throws IllegalArgumentException if the files contain a duplicate entry */ public static ImmutableMap<ObservableId, LocalDateDoubleTimeSeries> parse(Collection<CharSource> charSources) { // builder ensures keys can only be seen once ImmutableMap.Builder<ObservableId, LocalDateDoubleTimeSeries> builder = ImmutableMap.builder(); for (CharSource charSource : charSources) { builder.putAll(parseSingle(charSource)); } return builder.build(); }