Package tv.hd3g.csvkit
Class CSVKit
java.lang.Object
tv.hd3g.csvkit.CSVKit
Reusable
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final com.opencsv.CSVParserBuilderprotected final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaggregateById(Map<String, L> left, Map<String, R> right, BiFunction<L, R, C> transform, BiConsumer<String, R> lostLeft, BiConsumer<String, L> lostRight) protected com.opencsv.CSVReaderBuildercreateCSVReaderBuilder(Reader reader) static CSVKitcreateFrenchFlavor(int skipLines) groupingById(Stream<T> values, Function<? super T, String> idClassifier, Function<List<T>, R> transform) <T> voidimportAllCSV(Map<String, Supplier<byte[]>> rawSourcesBySourceNames, Charset sourceCharset, Predicate<String[]> rowValidator, Function<String[], T> transform, LinkedBlockingQueue<T> result) <T> voidimportCSV(byte[] rawSource, Charset sourceCharset, Predicate<String[]> rowValidator, Function<String[], T> transform, LinkedBlockingQueue<T> result)
-
Field Details
-
csvParserBuilder
protected final com.opencsv.CSVParserBuilder csvParserBuilder -
skipLines
protected final int skipLines
-
-
Constructor Details
-
CSVKit
public CSVKit(com.opencsv.CSVParserBuilder csvParserBuilder, int skipLines)
-
-
Method Details
-
createFrenchFlavor
-
createCSVReaderBuilder
-
importCSV
-
importAllCSV
-
groupingById
-
aggregateById
public static <L,R, Map<String,C> C> aggregateById(Map<String, L> left, Map<String, R> right, BiFunction<L, R, C> transform, BiConsumer<String, R> lostLeft, BiConsumer<String, L> lostRight) - Returns:
- Only the keys bettween left and right. The other will be sended on lostLeft/lostRight.
-