Adjust checkstyle rules. Make checkstyle fail the build when violations are found. Correct all current checkstyle violations.
This commit is contained in:
@ -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<>();
|
||||
|
@ -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;
|
||||
|
@ -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.
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user