Skip to content

Commit aeefc11

Browse files
authored
Merge pull request #1 from iluwatar/master
Update my local repository
2 parents e1ae106 + c94c8a3 commit aeefc11

1,117 files changed

Lines changed: 8126 additions & 5250 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
target
2-
.metadata
3-
.settings
4-
.classpath
5-
.project
6-
*.class
7-
# Package Files #
8-
*.jar
9-
*.war
10-
*.ear
11-
.idea
12-
*.iml
13-
*.swp
1+
target
2+
.metadata
3+
.settings
4+
.classpath
5+
.project
6+
*.class
7+
# Package Files #
8+
*.jar
9+
*.war
10+
*.ear
11+
.idea
12+
*.iml
13+
*.swp
1414
datanucleus.log
1515
/bin/
1616
/bin/
1717
/bin/
18-
19-
data-mapper/src/main/resources/log4j.xml
18+
*.log
19+
data-mapper/src/main/resources/log4j.xml

_scripts/postPumlsToServer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#
22
# The MIT License
3-
# Copyright (c) 2014 Ilkka Seppälä
3+
# Copyright (c) 2014-2016 Ilkka Seppälä
44
#
55
# Permission is hereby granted, free of charge, to any person obtaining a copy
66
# of this software and associated documentation files (the "Software"), to deal
Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,29 @@
11
@startuml
22
package com.iluwatar.abstractdocument.domain {
3-
class Part {
4-
+ Part(properties : Map<String, Object>)
3+
class Car {
4+
+ Car(properties : Map<String, Object>)
55
}
6-
interface HasPrice {
6+
interface HasModel {
77
+ PROPERTY : String {static}
8-
+ getPrice() : Optional<Number>
8+
+ getModel() : Optional<String>
99
}
1010
interface HasParts {
1111
+ PROPERTY : String {static}
1212
+ getParts() : Stream<Part>
1313
}
14-
class Car {
15-
+ Car(properties : Map<String, Object>)
14+
interface HasPrice {
15+
+ PROPERTY : String {static}
16+
+ getPrice() : Optional<Number>
1617
}
1718
interface HasType {
1819
+ PROPERTY : String {static}
1920
+ getType() : Optional<String>
2021
}
21-
interface HasModel {
22-
+ PROPERTY : String {static}
23-
+ getModel() : Optional<String>
22+
class Part {
23+
+ Part(properties : Map<String, Object>)
2424
}
2525
}
2626
package com.iluwatar.abstractdocument {
27-
class App {
28-
+ App()
29-
+ main(args : String[]) {static}
30-
}
3127
abstract class AbstractDocument {
3228
- properties : Map<String, Object>
3329
# AbstractDocument(properties : Map<String, Object>)
@@ -36,24 +32,28 @@ package com.iluwatar.abstractdocument {
3632
+ put(key : String, value : Object)
3733
+ toString() : String
3834
}
35+
class App {
36+
- LOGGER : Logger {static}
37+
+ App()
38+
+ main(args : String[]) {static}
39+
}
3940
interface Document {
4041
+ children(String, Function<Map<String, Object>, T>) : Stream<T> {abstract}
4142
+ get(String) : Object {abstract}
4243
+ put(String, Object) {abstract}
4344
}
4445
}
45-
AbstractDocument --+ Map
46-
Part ..|> HasType
47-
Part ..|> HasModel
48-
Part ..|> HasPrice
49-
Part --|> AbstractDocument
5046
AbstractDocument ..|> Document
51-
HasPrice --|> Document
52-
HasParts --|> Document
5347
Car ..|> HasModel
5448
Car ..|> HasPrice
5549
Car ..|> HasParts
5650
Car --|> AbstractDocument
57-
HasType --|> Document
5851
HasModel --|> Document
52+
HasParts --|> Document
53+
HasPrice --|> Document
54+
HasType --|> Document
55+
Part ..|> HasType
56+
Part ..|> HasModel
57+
Part ..|> HasPrice
58+
Part --|> AbstractDocument
5959
@enduml

abstract-document/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<!--
33
44
The MIT License
5-
Copyright (c) 2014 Ilkka Seppälä
5+
Copyright (c) 2014-2016 Ilkka Seppälä
66
77
Permission is hereby granted, free of charge, to any person obtaining a copy
88
of this software and associated documentation files (the "Software"), to deal

abstract-document/src/main/java/com/iluwatar/abstractdocument/AbstractDocument.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* The MIT License
3-
* Copyright (c) 2014 Ilkka Seppälä
3+
* Copyright (c) 2014-2016 Ilkka Seppälä
44
* <p>
55
* Permission is hereby granted, free of charge, to any person obtaining a copy
66
* of this software and associated documentation files (the "Software"), to deal

abstract-document/src/main/java/com/iluwatar/abstractdocument/App.java

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* The MIT License
3-
* Copyright (c) 2014 Ilkka Seppälä
3+
* Copyright (c) 2014-2016 Ilkka Seppälä
44
* <p>
55
* Permission is hereby granted, free of charge, to any person obtaining a copy
66
* of this software and associated documentation files (the "Software"), to deal
@@ -27,6 +27,8 @@
2727
import com.iluwatar.abstractdocument.domain.HasParts;
2828
import com.iluwatar.abstractdocument.domain.HasPrice;
2929
import com.iluwatar.abstractdocument.domain.HasType;
30+
import org.slf4j.Logger;
31+
import org.slf4j.LoggerFactory;
3032

3133
import java.util.Arrays;
3234
import java.util.HashMap;
@@ -44,11 +46,13 @@
4446
*/
4547
public class App {
4648

49+
private static final Logger LOGGER = LoggerFactory.getLogger(App.class);
50+
4751
/**
4852
* Executes the App
4953
*/
5054
public App() {
51-
System.out.println("Constructing parts and car");
55+
LOGGER.info("Constructing parts and car");
5256

5357
Map<String, Object> carProperties = new HashMap<>();
5458
carProperties.put(HasModel.PROPERTY, "300SL");
@@ -68,12 +72,11 @@ public App() {
6872

6973
Car car = new Car(carProperties);
7074

71-
System.out.println("Here is our car:");
72-
System.out.println("-> model: " + car.getModel().get());
73-
System.out.println("-> price: " + car.getPrice().get());
74-
System.out.println("-> parts: ");
75-
car.getParts().forEach(p -> System.out
76-
.println("\t" + p.getType().get() + "/" + p.getModel().get() + "/" + p.getPrice().get()));
75+
LOGGER.info("Here is our car:");
76+
LOGGER.info("-> model: {}", car.getModel().get());
77+
LOGGER.info("-> price: {}", car.getPrice().get());
78+
LOGGER.info("-> parts: ");
79+
car.getParts().forEach(p -> LOGGER.info("\t{}/{}/{}", p.getType().get(), p.getModel().get(), p.getPrice().get()));
7780
}
7881

7982
/**

abstract-document/src/main/java/com/iluwatar/abstractdocument/Document.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* The MIT License
3-
* Copyright (c) 2014 Ilkka Seppälä
3+
* Copyright (c) 2014-2016 Ilkka Seppälä
44
* <p>
55
* Permission is hereby granted, free of charge, to any person obtaining a copy
66
* of this software and associated documentation files (the "Software"), to deal

abstract-document/src/main/java/com/iluwatar/abstractdocument/domain/Car.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* The MIT License
3-
* Copyright (c) 2014 Ilkka Seppälä
3+
* Copyright (c) 2014-2016 Ilkka Seppälä
44
* <p>
55
* Permission is hereby granted, free of charge, to any person obtaining a copy
66
* of this software and associated documentation files (the "Software"), to deal

abstract-document/src/main/java/com/iluwatar/abstractdocument/domain/HasModel.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* The MIT License
3-
* Copyright (c) 2014 Ilkka Seppälä
3+
* Copyright (c) 2014-2016 Ilkka Seppälä
44
* <p>
55
* Permission is hereby granted, free of charge, to any person obtaining a copy
66
* of this software and associated documentation files (the "Software"), to deal

abstract-document/src/main/java/com/iluwatar/abstractdocument/domain/HasParts.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* The MIT License
3-
* Copyright (c) 2014 Ilkka Seppälä
3+
* Copyright (c) 2014-2016 Ilkka Seppälä
44
* <p>
55
* Permission is hereby granted, free of charge, to any person obtaining a copy
66
* of this software and associated documentation files (the "Software"), to deal

0 commit comments

Comments
 (0)