Resolves checkstyle errors for ambassador, async-method-invocation, balking, bridge, builder (#1058)
* Decreases checkstyle errors for ambassador pattern * Reduces checkstyle errors in async-method-invocation * Reduces checkstyle errors in balking * Reduces checkstyle errors in bridge * Reduces checkstyle errors in builder
This commit is contained in:
committed by
Ilkka Seppälä
parent
1fa8a604eb
commit
6d1c0b1563
@ -27,25 +27,25 @@ import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
*
|
||||
* Composition over inheritance. The Bridge pattern can also be thought of as two layers of abstraction.
|
||||
* With Bridge, you can decouple an abstraction from its implementation so that the two can vary independently.
|
||||
* <p>
|
||||
* In Bridge pattern both abstraction ({@link Weapon}) and implementation (
|
||||
* {@link Enchantment}) have their own class hierarchies. The interface of the implementations
|
||||
* can be changed without affecting the clients.
|
||||
* <p>
|
||||
* In this example we have two class hierarchies. One of weapons and another one of enchantments. We can easily
|
||||
* combine any weapon with any enchantment using composition instead of creating deep class hierarchy.
|
||||
*
|
||||
* Composition over inheritance. The Bridge pattern can also be thought of as two layers of
|
||||
* abstraction. With Bridge, you can decouple an abstraction from its implementation so that the two
|
||||
* can vary independently.
|
||||
*
|
||||
* <p>In Bridge pattern both abstraction ({@link Weapon}) and implementation ( {@link Enchantment})
|
||||
* have their own class hierarchies. The interface of the implementations can be changed without
|
||||
* affecting the clients.
|
||||
*
|
||||
* <p>In this example we have two class hierarchies. One of weapons and another one of
|
||||
* enchantments. We can easily combine any weapon with any enchantment using composition instead of
|
||||
* creating deep class hierarchy.
|
||||
*/
|
||||
public class App {
|
||||
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(App.class);
|
||||
|
||||
/**
|
||||
* Program entry point
|
||||
*
|
||||
* Program entry point.
|
||||
*
|
||||
* @param args command line args
|
||||
*/
|
||||
public static void main(String[] args) {
|
||||
|
@ -24,9 +24,7 @@
|
||||
package com.iluwatar.bridge;
|
||||
|
||||
/**
|
||||
*
|
||||
* Enchantment
|
||||
*
|
||||
* Enchantment.
|
||||
*/
|
||||
public interface Enchantment {
|
||||
|
||||
|
@ -27,9 +27,7 @@ import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
*
|
||||
* FlyingEnchantment
|
||||
*
|
||||
* FlyingEnchantment.
|
||||
*/
|
||||
public class FlyingEnchantment implements Enchantment {
|
||||
|
||||
|
@ -27,9 +27,7 @@ import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
*
|
||||
* Hammer
|
||||
*
|
||||
* Hammer.
|
||||
*/
|
||||
public class Hammer implements Weapon {
|
||||
|
||||
|
@ -27,9 +27,7 @@ import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
*
|
||||
* SoulEatingEnchantment
|
||||
*
|
||||
* SoulEatingEnchantment.
|
||||
*/
|
||||
public class SoulEatingEnchantment implements Enchantment {
|
||||
|
||||
|
@ -27,9 +27,7 @@ import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
*
|
||||
* Sword
|
||||
*
|
||||
* Sword.
|
||||
*/
|
||||
public class Sword implements Weapon {
|
||||
|
||||
|
@ -24,9 +24,7 @@
|
||||
package com.iluwatar.bridge;
|
||||
|
||||
/**
|
||||
*
|
||||
* Weapon
|
||||
*
|
||||
* Weapon.
|
||||
*/
|
||||
public interface Weapon {
|
||||
|
||||
|
Reference in New Issue
Block a user