Adjust checkstyle rules. Make checkstyle fail the build when violations are found. Correct all current checkstyle violations.
This commit is contained in:
@@ -27,6 +27,9 @@ public class Weather {
|
||||
observers.remove(obs);
|
||||
}
|
||||
|
||||
/**
|
||||
* Makes time pass for weather
|
||||
*/
|
||||
public void timePasses() {
|
||||
WeatherType[] enumValues = WeatherType.values();
|
||||
currentWeather = enumValues[(currentWeather.ordinal() + 1) % enumValues.length];
|
||||
|
@@ -15,6 +15,9 @@ public class GWeather extends Observable<GWeather, Race, WeatherType> {
|
||||
currentWeather = WeatherType.SUNNY;
|
||||
}
|
||||
|
||||
/**
|
||||
* Makes time pass for weather
|
||||
*/
|
||||
public void timePasses() {
|
||||
WeatherType[] enumValues = WeatherType.values();
|
||||
currentWeather = enumValues[(currentWeather.ordinal() + 1) % enumValues.length];
|
||||
|
@@ -22,6 +22,9 @@ public abstract class Observable<S extends Observable<S, O, A>, O extends Observ
|
||||
this.observers.add(observer);
|
||||
}
|
||||
|
||||
/**
|
||||
* Notify observers
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public void notifyObservers(A argument) {
|
||||
for (O observer : observers) {
|
||||
|
@@ -3,10 +3,6 @@ package com.iluwatar.observer.generic;
|
||||
/**
|
||||
*
|
||||
* Observer
|
||||
*
|
||||
* @param <S>
|
||||
* @param <O>
|
||||
* @param <A>
|
||||
*/
|
||||
public interface Observer<S extends Observable<S, O, A>, O extends Observer<S, O, A>, A> {
|
||||
|
||||
|
Reference in New Issue
Block a user