Adjust checkstyle rules. Make checkstyle fail the build when violations are found. Correct all current checkstyle violations.

This commit is contained in:
Ilkka Seppala
2015-12-25 23:49:28 +02:00
parent 9fbb085985
commit cec9a99410
167 changed files with 1242 additions and 969 deletions

View File

@ -1,15 +1,19 @@
package com.iluwatar.fluentinterface.app;
import static java.lang.String.valueOf;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Iterator;
import java.util.List;
import java.util.StringJoiner;
import java.util.function.Function;
import java.util.function.Predicate;
import com.iluwatar.fluentinterface.fluentiterable.FluentIterable;
import com.iluwatar.fluentinterface.fluentiterable.lazy.LazyFluentIterable;
import com.iluwatar.fluentinterface.fluentiterable.simple.SimpleFluentIterable;
import java.util.*;
import java.util.function.Function;
import java.util.function.Predicate;
import static java.lang.String.valueOf;
/**
* The Fluent Interface pattern is useful when you want to provide an easy readable, flowing API.
* Those interfaces tend to mimic domain specific languages, so they can nearly be read as human
@ -24,6 +28,9 @@ import static java.lang.String.valueOf;
*/
public class App {
/**
* Program entry point
*/
public static void main(String[] args) {
List<Integer> integerList = new ArrayList<>();

View File

@ -5,8 +5,6 @@ import java.util.Iterator;
/**
* This class is used to realize LazyFluentIterables. It decorates a given iterator. Does not
* support consecutive hasNext() calls.
*
* @param <TYPE>
*/
public abstract class DecoratingIterator<TYPE> implements Iterator<TYPE> {
@ -16,8 +14,6 @@ public abstract class DecoratingIterator<TYPE> implements Iterator<TYPE> {
/**
* Creates an iterator that decorates the given iterator.
*
* @param fromIterator
*/
public DecoratingIterator(Iterator<TYPE> fromIterator) {
this.fromIterator = fromIterator;

View File

@ -1,12 +1,16 @@
package com.iluwatar.fluentinterface.fluentiterable.simple;
import com.iluwatar.fluentinterface.fluentiterable.FluentIterable;
import java.util.*;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Optional;
import java.util.Spliterator;
import java.util.function.Consumer;
import java.util.function.Function;
import java.util.function.Predicate;
import com.iluwatar.fluentinterface.fluentiterable.FluentIterable;
/**
* This is a simple implementation of the FluentIterable interface. It evaluates all chained
* operations eagerly. This implementation would be costly to be utilized in real applications.

View File

@ -26,7 +26,7 @@ import static org.mockito.Mockito.verifyNoMoreInteractions;
public abstract class FluentIterableTest {
/**
* Create a new {@link FluentIterable<Integer>} from the given integers
* Create a new {@link FluentIterable} from the given integers
*
* @param integers The integers
* @return The new iterable, use for testing