Resolves checkstyle errors for facade factory-kit spatial-partition state step-builder (#1077)
* Reduces checkstyle errors in facade * Reduces checkstyle errors in factory-kit * Reduces checkstyle errors in spatial-partition * Reduces checkstyle errors in state * Reduces checkstyle errors in step-builder
This commit is contained in:
committed by
Ilkka Seppälä
parent
2628cc0dfc
commit
c954a436ad
@ -27,9 +27,7 @@ import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
*
|
||||
* Angry state.
|
||||
*
|
||||
*/
|
||||
public class AngryState implements State {
|
||||
|
||||
|
@ -24,20 +24,18 @@
|
||||
package com.iluwatar.state;
|
||||
|
||||
/**
|
||||
*
|
||||
* In State pattern the container object has an internal state object that defines the current
|
||||
* behavior. The state object can be changed to alter the behavior.
|
||||
* <p>
|
||||
* This can be a cleaner way for an object to change its behavior at runtime without resorting to
|
||||
* large monolithic conditional statements and thus improves maintainability.
|
||||
* <p>
|
||||
* In this example the {@link Mammoth} changes its behavior as time passes by.
|
||||
*
|
||||
*
|
||||
* <p>This can be a cleaner way for an object to change its behavior at runtime without resorting
|
||||
* to large monolithic conditional statements and thus improves maintainability.
|
||||
*
|
||||
* <p>In this example the {@link Mammoth} changes its behavior as time passes by.
|
||||
*/
|
||||
public class App {
|
||||
|
||||
/**
|
||||
* Program entry point
|
||||
* Program entry point.
|
||||
*/
|
||||
public static void main(String[] args) {
|
||||
|
||||
|
@ -24,9 +24,7 @@
|
||||
package com.iluwatar.state;
|
||||
|
||||
/**
|
||||
*
|
||||
* Mammoth has internal state that defines its behavior.
|
||||
*
|
||||
*/
|
||||
public class Mammoth {
|
||||
|
||||
@ -37,7 +35,7 @@ public class Mammoth {
|
||||
}
|
||||
|
||||
/**
|
||||
* Makes time pass for the mammoth
|
||||
* Makes time pass for the mammoth.
|
||||
*/
|
||||
public void timePasses() {
|
||||
if (state.getClass().equals(PeacefulState.class)) {
|
||||
|
@ -27,9 +27,7 @@ import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
*
|
||||
* Peaceful state.
|
||||
*
|
||||
*/
|
||||
public class PeacefulState implements State {
|
||||
|
||||
|
@ -24,9 +24,7 @@
|
||||
package com.iluwatar.state;
|
||||
|
||||
/**
|
||||
*
|
||||
* State interface.
|
||||
*
|
||||
*/
|
||||
public interface State {
|
||||
|
||||
|
Reference in New Issue
Block a user