Created
January 25, 2022 23:01
-
-
Save mp-singh/9daef4883525d2cf3da68af5ed96a937 to your computer and use it in GitHub Desktop.
example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void main(String[] args) { | |
Map<String, T3Return> map = new HashMap<>(); | |
try (BufferedReader br = new BufferedReader(new FileReader("src/main/resources/sample.csv"))) { | |
map = br.lines() | |
.skip(1) | |
.map(l -> { | |
String[] record = l.split(","); | |
return new T3Return(record[0], record[1], record[2], record[3], record[4], record[5]); | |
}) | |
.filter(Validation::isValidT3Return) | |
.collect(Collectors.toMap(T3Return::getTan, Function.identity())); | |
} catch (IOException e) { | |
e.printStackTrace(); | |
} | |
map.forEach((s, t3Return) -> System.out.println("entry e:" + s + "->" + t3Return)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment