mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-05-21 08:24:40 +00:00
deps: Refactor dependencies (#3224)
* remove spring dep move junit, logging, mockito under dep mgmt * upgrade anti-corruption-layer deps * async method invocation * balking, bloc * bridge to bytecode * caching * callback - cqrs * component - health check * hexagonal - metadata mapping * rest of the patterns * remove checkstyle, take spotless into use
This commit is contained in:
@@ -40,12 +40,16 @@ public class App {
|
||||
*/
|
||||
public static void main(String[] args) {
|
||||
|
||||
MmaBantamweightFighter fighter1 = new MmaBantamweightFighter("Joe", "Johnson", "The Geek", "Muay Thai");
|
||||
MmaBantamweightFighter fighter2 = new MmaBantamweightFighter("Ed", "Edwards", "The Problem Solver", "Judo");
|
||||
MmaBantamweightFighter fighter1 =
|
||||
new MmaBantamweightFighter("Joe", "Johnson", "The Geek", "Muay Thai");
|
||||
MmaBantamweightFighter fighter2 =
|
||||
new MmaBantamweightFighter("Ed", "Edwards", "The Problem Solver", "Judo");
|
||||
fighter1.fight(fighter2);
|
||||
|
||||
MmaHeavyweightFighter fighter3 = new MmaHeavyweightFighter("Dave", "Davidson", "The Bug Smasher", "Kickboxing");
|
||||
MmaHeavyweightFighter fighter4 = new MmaHeavyweightFighter("Jack", "Jackson", "The Pragmatic", "Brazilian Jiu-Jitsu");
|
||||
MmaHeavyweightFighter fighter3 =
|
||||
new MmaHeavyweightFighter("Dave", "Davidson", "The Bug Smasher", "Kickboxing");
|
||||
MmaHeavyweightFighter fighter4 =
|
||||
new MmaHeavyweightFighter("Jack", "Jackson", "The Pragmatic", "Brazilian Jiu-Jitsu");
|
||||
fighter3.fight(fighter4);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,5 +32,4 @@ package crtp;
|
||||
public interface Fighter<T> {
|
||||
|
||||
void fight(T t);
|
||||
|
||||
}
|
||||
|
||||
@@ -24,13 +24,10 @@
|
||||
*/
|
||||
package crtp;
|
||||
|
||||
/**
|
||||
* MmaBantamweightFighter class.
|
||||
*/
|
||||
/** MmaBantamweightFighter class. */
|
||||
class MmaBantamweightFighter extends MmaFighter<MmaBantamweightFighter> {
|
||||
|
||||
public MmaBantamweightFighter(String name, String surname, String nickName, String speciality) {
|
||||
super(name, surname, nickName, speciality);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,13 +24,10 @@
|
||||
*/
|
||||
package crtp;
|
||||
|
||||
/**
|
||||
* MmaHeavyweightFighter.
|
||||
*/
|
||||
/** MmaHeavyweightFighter. */
|
||||
public class MmaHeavyweightFighter extends MmaFighter<MmaHeavyweightFighter> {
|
||||
|
||||
public MmaHeavyweightFighter(String name, String surname, String nickName, String speciality) {
|
||||
super(name, surname, nickName, speciality);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -24,13 +24,10 @@
|
||||
*/
|
||||
package crtp;
|
||||
|
||||
/**
|
||||
* MmaLightweightFighter class.
|
||||
*/
|
||||
/** MmaLightweightFighter class. */
|
||||
class MmaLightweightFighter extends MmaFighter<MmaLightweightFighter> {
|
||||
|
||||
public MmaLightweightFighter(String name, String surname, String nickName, String speciality) {
|
||||
super(name, surname, nickName, speciality);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user