Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
alx_mszczonow_1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Patryk Czarnik
alx_mszczonow_1
Commits
e42a5d52
Commit
e42a5d52
authored
Jul 10, 2023
by
Patryk Czarnik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ObslugaCSV - pierwsza wersja
parent
76703f17
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
0 deletions
+29
-0
ObslugaCSV.java
src/main/java/emps/ObslugaCSV.java
+29
-0
No files found.
src/main/java/emps/ObslugaCSV.java
0 → 100644
View file @
e42a5d52
package
emps
;
import
java.io.BufferedReader
;
import
java.io.FileNotFoundException
;
import
java.io.FileReader
;
import
java.io.IOException
;
import
java.time.LocalDate
;
import
java.util.ArrayList
;
import
java.util.List
;
public
class
ObslugaCSV
{
public
static
List
<
Employee
>
wczytaj
(
String
sciezka
)
{
List
<
Employee
>
emps
=
new
ArrayList
<>();
try
(
BufferedReader
reader
=
new
BufferedReader
(
new
FileReader
(
sciezka
)))
{
String
linia
;
while
((
linia
=
reader
.
readLine
())
!=
null
)
{
String
[]
t
=
linia
.
split
(
";"
);
Employee
emp
=
new
Employee
(
Integer
.
parseInt
(
t
[
0
]),
t
[
1
],
t
[
2
],
t
[
3
],
Integer
.
parseInt
(
t
[
4
]),
LocalDate
.
parse
(
t
[
5
]),
t
[
6
],
t
[
7
],
t
[
8
],
t
[
9
],
t
[
10
]);
emps
.
add
(
emp
);
}
}
catch
(
IOException
e
)
{
throw
new
RuntimeException
(
e
);
}
return
emps
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment