Resolves checkstyle issues for semaphore servant serverless service-layer service-locator (#1079)
* Reduces checkstyle errors in semaphore * Reduces checkstyle errors in servant * Reduces checkstyle errors in serverless * Reduces checkstyle errors in service-layer * Reduces checkstyle errors in service-locator
This commit is contained in:
committed by
Ilkka Seppälä
parent
37599eb48f
commit
390795154f
@ -23,29 +23,27 @@
|
||||
|
||||
package com.iluwatar.servant;
|
||||
|
||||
import java.util.List;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* Servant offers some functionality to a group of classes without defining that functionality in
|
||||
* each of them. A Servant is a class whose instance provides methods that take care of a desired
|
||||
* service, while objects for which the servant does something, are taken as parameters.
|
||||
* <p>
|
||||
* In this example {@link Servant} is serving {@link King} and {@link Queen}.
|
||||
*
|
||||
* <p>In this example {@link Servant} is serving {@link King} and {@link Queen}.
|
||||
*/
|
||||
public class App {
|
||||
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(App.class);
|
||||
|
||||
static Servant jenkins = new Servant("Jenkins");
|
||||
static Servant travis = new Servant("Travis");
|
||||
private static Servant jenkins = new Servant("Jenkins");
|
||||
private static Servant travis = new Servant("Travis");
|
||||
|
||||
/**
|
||||
* Program entry point
|
||||
* Program entry point.
|
||||
*/
|
||||
public static void main(String[] args) {
|
||||
scenario(jenkins, 1);
|
||||
@ -53,7 +51,7 @@ public class App {
|
||||
}
|
||||
|
||||
/**
|
||||
* Can add a List with enum Actions for variable scenarios
|
||||
* Can add a List with enum Actions for variable scenarios.
|
||||
*/
|
||||
public static void scenario(Servant servant, int compliment) {
|
||||
King k = new King();
|
||||
|
@ -24,9 +24,7 @@
|
||||
package com.iluwatar.servant;
|
||||
|
||||
/**
|
||||
*
|
||||
* King
|
||||
*
|
||||
* King.
|
||||
*/
|
||||
public class King implements Royalty {
|
||||
|
||||
|
@ -24,9 +24,7 @@
|
||||
package com.iluwatar.servant;
|
||||
|
||||
/**
|
||||
*
|
||||
* Queen
|
||||
*
|
||||
* Queen.
|
||||
*/
|
||||
public class Queen implements Royalty {
|
||||
|
||||
|
@ -24,9 +24,7 @@
|
||||
package com.iluwatar.servant;
|
||||
|
||||
/**
|
||||
*
|
||||
* Royalty
|
||||
*
|
||||
* Royalty.
|
||||
*/
|
||||
interface Royalty {
|
||||
|
||||
|
@ -26,16 +26,14 @@ package com.iluwatar.servant;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* Servant
|
||||
*
|
||||
* Servant.
|
||||
*/
|
||||
public class Servant {
|
||||
|
||||
public String name;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* Constructor.
|
||||
*/
|
||||
public Servant(String name) {
|
||||
this.name = name;
|
||||
@ -54,7 +52,7 @@ public class Servant {
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if we will be hanged
|
||||
* Check if we will be hanged.
|
||||
*/
|
||||
public boolean checkIfYouWillBeHanged(List<Royalty> tableGuests) {
|
||||
boolean anotherDay = true;
|
||||
|
Reference in New Issue
Block a user