Resolves checkstyle errors for abstract-document abstract-factory acyclic-visitor adapter aggregator-microservices (#1080)

* Reduces checkstyle errors in abstract-document

* Reduces checkstyle errors in abstract-factory

* Reduces checkstyle errors in acyclic-visitor

* Reduces checkstyle errors in adapter

* Reduces checkstyle errors in aggregator-microservices
This commit is contained in:
Anurag Agarwal
2019-11-12 02:00:08 +05:30
committed by Ilkka Seppälä
parent 390795154f
commit 1e76d91929
50 changed files with 154 additions and 211 deletions

View File

@ -24,35 +24,28 @@
package com.iluwatar.adapter;
/**
* An adapter helps two incompatible interfaces to work together. This is the
* real world definition for an adapter. Interfaces may be incompatible but
* the inner functionality should suit the need. The Adapter design pattern
* allows otherwise incompatible classes to work together by converting the
* interface of one class into an interface expected by the clients.
* An adapter helps two incompatible interfaces to work together. This is the real world definition
* for an adapter. Interfaces may be incompatible but the inner functionality should suit the need.
* The Adapter design pattern allows otherwise incompatible classes to work together by converting
* the interface of one class into an interface expected by the clients.
*
* <p>
* There are two variations of the Adapter pattern: The class adapter
* implements the adaptee's interface whereas the object adapter uses
* composition to contain the adaptee in the adapter object. This example uses
* the object adapter approach.
* <p>There are two variations of the Adapter pattern: The class adapter implements the adaptee's
* interface whereas the object adapter uses composition to contain the adaptee in the adapter
* object. This example uses the object adapter approach.
*
* <p>
* The Adapter ({@link FishingBoatAdapter}) converts the interface of the
* adaptee class ({@link FishingBoat}) into a suitable one expected by the
* client ({@link RowingBoat}).
*
* <p>
* The story of this implementation is this. <br>
* Pirates are coming! we need a {@link RowingBoat} to flee! We have a
* {@link FishingBoat} and our captain. We have no time to make up a new ship!
* we need to reuse this {@link FishingBoat}. The captain needs a rowing boat
* which he can operate. The spec is in {@link RowingBoat}. We will use the
* Adapter pattern to reuse {@link FishingBoat}.
* <p>The Adapter ({@link FishingBoatAdapter}) converts the interface of the adaptee class ({@link
* FishingBoat}) into a suitable one expected by the client ({@link RowingBoat}).
*
* <p>The story of this implementation is this. <br> Pirates are coming! we need a {@link
* RowingBoat} to flee! We have a {@link FishingBoat} and our captain. We have no time to make up a
* new ship! we need to reuse this {@link FishingBoat}. The captain needs a rowing boat which he can
* operate. The spec is in {@link RowingBoat}. We will use the Adapter pattern to reuse {@link
* FishingBoat}.
*/
public final class App {
private App() { }
private App() {
}
/**
* Program entry point.

View File

@ -24,14 +24,14 @@
package com.iluwatar.adapter;
/**
* The Captain uses {@link RowingBoat} to sail. <br>
* This is the client in the pattern.
* The Captain uses {@link RowingBoat} to sail. <br> This is the client in the pattern.
*/
public final class Captain {
private RowingBoat rowingBoat;
public Captain() { }
public Captain() {
}
public Captain(final RowingBoat boat) {
this.rowingBoat = boat;

View File

@ -23,15 +23,13 @@
package com.iluwatar.adapter;
import org.slf4j.Logger;
import static org.slf4j.LoggerFactory.getLogger;
import org.slf4j.Logger;
/**
*
* Device class (adaptee in the pattern). We want to reuse this class.
* Fishing boat moves by sailing.
*
* Device class (adaptee in the pattern). We want to reuse this class. Fishing boat moves by
* sailing.
*/
final class FishingBoat {

View File

@ -24,10 +24,8 @@
package com.iluwatar.adapter;
/**
*
* Adapter class. Adapts the interface of the device ({@link FishingBoat})
* into {@link RowingBoat} interface expected by the client ({@link Captain}).
*
* Adapter class. Adapts the interface of the device ({@link FishingBoat}) into {@link RowingBoat}
* interface expected by the client ({@link Captain}).
*/
public class FishingBoatAdapter implements RowingBoat {

View File

@ -24,9 +24,7 @@
package com.iluwatar.adapter;
/**
* The interface expected by the client.<br>
* A rowing boat is rowed to move.
*
* The interface expected by the client.<br> A rowing boat is rowed to move.
*/
public interface RowingBoat {