File tree Expand file tree Collapse file tree 16 files changed +363
-1
lines changed
src/main/java/ru/netology Expand file tree Collapse file tree 16 files changed +363
-1
lines changed Original file line number Diff line number Diff line change 3434
35354.1. [ x] [ Исключительные ситуации и их обработка. Тестирование исключений] ( exceptions )
3636
37- 4.2. [ ] [ Интерфейсы для организации малой связности. Обобщённое программирование (Generics)] ( interfaces )
37+ 4.2. [ x ] [ Интерфейсы для организации малой связности. Обобщённое программирование (Generics)] ( interfaces )
3838
39394.3. [ ] [ Collections Framework. CRUD и тестирование систем, управляющих набором объектов] ( collections )
Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2+ <project xmlns =" http://maven.apache.org/POM/4.0.0"
3+ xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
4+ xsi : schemaLocation =" http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" >
5+ <modelVersion >4.0.0</modelVersion >
6+
7+ <groupId >ru.netology</groupId >
8+ <artifactId >mfu</artifactId >
9+ <version >1.0-SNAPSHOT</version >
10+
11+ <properties >
12+ <maven .compiler.source>11</maven .compiler.source>
13+ <maven .compiler.target>11</maven .compiler.target>
14+ <project .build.sourceEncoding>UTF-8</project .build.sourceEncoding>
15+ </properties >
16+
17+ <dependencies >
18+ <dependency >
19+ <groupId >org.projectlombok</groupId >
20+ <artifactId >lombok</artifactId >
21+ <version >1.18.12</version >
22+ <scope >provided</scope >
23+ </dependency >
24+ <dependency >
25+ <groupId >org.junit.jupiter</groupId >
26+ <artifactId >junit-jupiter</artifactId >
27+ <version >5.4.2</version >
28+ <scope >test</scope >
29+ </dependency >
30+ <dependency >
31+ <groupId >org.mockito</groupId >
32+ <artifactId >mockito-junit-jupiter</artifactId >
33+ <version >3.3.3</version >
34+ <scope >test</scope >
35+ </dependency >
36+ </dependencies >
37+
38+ <build >
39+ <plugins >
40+ <plugin >
41+ <groupId >org.apache.maven.plugins</groupId >
42+ <artifactId >maven-surefire-plugin</artifactId >
43+ <version >2.22.2</version >
44+ </plugin >
45+ </plugins >
46+ </build >
47+ </project >
Original file line number Diff line number Diff line change 1+ package ru .netology ;
2+
3+ import ru .netology .domain .Document ;
4+
5+ public interface Printer {
6+ void print (Document document );
7+ }
Original file line number Diff line number Diff line change 1+ package ru .netology ;
2+
3+ import ru .netology .domain .Document ;
4+
5+ public interface Scanner {
6+ Document scan ();
7+ }
Original file line number Diff line number Diff line change 1+ package ru .netology .domain ;
2+
3+ import lombok .AllArgsConstructor ;
4+ import lombok .Data ;
5+ import lombok .NoArgsConstructor ;
6+
7+ @ NoArgsConstructor
8+ @ AllArgsConstructor
9+ @ Data
10+ public class Document {
11+ private int id ;
12+ private String name ;
13+ private String content ;
14+ }
Original file line number Diff line number Diff line change 1+ package ru .netology .hp ;
2+
3+ import ru .netology .Printer ;
4+ import ru .netology .domain .Document ;
5+
6+ public class LJ1210 implements Printer {
7+ @ Override
8+ public void print (Document document ) {
9+
10+ }
11+ }
12+
13+
14+
15+
16+
17+
18+
19+
Original file line number Diff line number Diff line change 1+ package ru .netology .hp ;
2+
3+ import ru .netology .Printer ;
4+ import ru .netology .Scanner ;
5+ import ru .netology .domain .Document ;
6+
7+ public class LJProM283 implements Printer , Scanner {
8+ @ Override
9+ public void print (Document document ) {
10+
11+ }
12+
13+ @ Override
14+ public Document scan () {
15+ return null ;
16+ }
17+ }
18+
19+
Original file line number Diff line number Diff line change 1+ package ru .netology .service ;
2+
3+ import ru .netology .domain .Document ;
4+ import ru .netology .Printer ;
5+
6+ public class OfficeService {
7+ public void print (Document document , Printer printer ) {
8+ printer .print (document );
9+ }
10+ }
11+
12+
13+
14+
Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2+ <project xmlns =" http://maven.apache.org/POM/4.0.0"
3+ xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
4+ xsi : schemaLocation =" http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" >
5+ <modelVersion >4.0.0</modelVersion >
6+
7+ <groupId >ru.netology</groupId >
8+ <artifactId >sorting</artifactId >
9+ <version >1.0-SNAPSHOT</version >
10+
11+ <properties >
12+ <maven .compiler.source>11</maven .compiler.source>
13+ <maven .compiler.target>11</maven .compiler.target>
14+ <project .build.sourceEncoding>UTF-8</project .build.sourceEncoding>
15+ </properties >
16+
17+ <dependencies >
18+ <dependency >
19+ <groupId >org.projectlombok</groupId >
20+ <artifactId >lombok</artifactId >
21+ <version >1.18.12</version >
22+ <scope >provided</scope >
23+ </dependency >
24+ <dependency >
25+ <groupId >org.junit.jupiter</groupId >
26+ <artifactId >junit-jupiter</artifactId >
27+ <version >5.4.2</version >
28+ <scope >test</scope >
29+ </dependency >
30+ <dependency >
31+ <groupId >org.mockito</groupId >
32+ <artifactId >mockito-junit-jupiter</artifactId >
33+ <version >3.3.3</version >
34+ <scope >test</scope >
35+ </dependency >
36+ </dependencies >
37+
38+ <build >
39+ <plugins >
40+ <plugin >
41+ <groupId >org.apache.maven.plugins</groupId >
42+ <artifactId >maven-surefire-plugin</artifactId >
43+ <version >2.22.2</version >
44+ </plugin >
45+ </plugins >
46+ </build >
47+ </project >
Original file line number Diff line number Diff line change 1+ package ru .netology .container ;
2+
3+ public class Box {
4+ private Object value ;
5+
6+ public Box (Object value ) {
7+ this .value = value ;
8+ }
9+
10+ public boolean isEmpty () {
11+ return value == null ;
12+ }
13+
14+ public Object getValue () {
15+ return value ;
16+ }
17+ }
You can’t perform that action at this time.
0 commit comments