Skip to content

Commit 2921448

Browse files
committed
iluwatar#497 Add missing puml and license headers
1 parent 952c207 commit 2921448

File tree

3 files changed

+95
-0
lines changed

3 files changed

+95
-0
lines changed

converter/etc/converter.urm.puml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
@startuml
2+
package com.iluwatar.converter {
3+
class App {
4+
+ App()
5+
+ main(args : String[]) {static}
6+
}
7+
class Converter<T, U> {
8+
- fromDto : Function<T, U>
9+
- fromEntity : Function<U, T>
10+
+ Converter<T, U>(fromDto : Function<T, U>, fromEntity : Function<U, T>)
11+
+ convertFromDto(userDto : T) : U
12+
+ convertFromEntity(user : U) : T
13+
+ createFromDtos(dtoUsers : Collection<T>) : List<U>
14+
+ createFromEntities(users : Collection<U>) : List<T>
15+
}
16+
class User {
17+
- firstName : String
18+
- isActive : boolean
19+
- lastName : String
20+
- userId : String
21+
+ User(firstName : String, lastName : String, isActive : boolean, userId : String)
22+
+ equals(o : Object) : boolean
23+
+ getFirstName() : String
24+
+ getLastName() : String
25+
+ getUserId() : String
26+
+ hashCode() : int
27+
+ isActive() : boolean
28+
+ toString() : String
29+
}
30+
class UserConverter {
31+
+ UserConverter()
32+
}
33+
class UserDto {
34+
- email : String
35+
- firstName : String
36+
- isActive : boolean
37+
- lastName : String
38+
+ UserDto(firstName : String, lastName : String, isActive : boolean, email : String)
39+
+ equals(o : Object) : boolean
40+
+ getEmail() : String
41+
+ getFirstName() : String
42+
+ getLastName() : String
43+
+ hashCode() : int
44+
+ isActive() : boolean
45+
+ toString() : String
46+
}
47+
}
48+
UserConverter --|> Converter
49+
@enduml

converter/pom.xml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,28 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
4+
The MIT License
5+
Copyright (c) 2014 Ilkka Seppälä
6+
7+
Permission is hereby granted, free of charge, to any person obtaining a copy
8+
of this software and associated documentation files (the "Software"), to deal
9+
in the Software without restriction, including without limitation the rights
10+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11+
copies of the Software, and to permit persons to whom the Software is
12+
furnished to do so, subject to the following conditions:
13+
14+
The above copyright notice and this permission notice shall be included in
15+
all copies or substantial portions of the Software.
16+
17+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23+
THE SOFTWARE.
24+
25+
-->
226
<project xmlns="http://maven.apache.org/POM/4.0.0"
327
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
428
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

converter/src/test/java/com/iluwatar/converter/ConverterTest.java

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,25 @@
1+
/**
2+
* The MIT License
3+
* Copyright (c) 2014 Ilkka Seppälä
4+
*
5+
* Permission is hereby granted, free of charge, to any person obtaining a copy
6+
* of this software and associated documentation files (the "Software"), to deal
7+
* in the Software without restriction, including without limitation the rights
8+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
* copies of the Software, and to permit persons to whom the Software is
10+
* furnished to do so, subject to the following conditions:
11+
*
12+
* The above copyright notice and this permission notice shall be included in
13+
* all copies or substantial portions of the Software.
14+
*
15+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
* THE SOFTWARE.
22+
*/
123
package com.iluwatar.converter;
224

325
import com.google.common.collect.Lists;

0 commit comments

Comments
 (0)