package org.ricardogarfe.katas;

import java.util.*;
import java.util.function.Predicate;
import java.util.stream.IntStream;

/**
 * Created by ricardo on 1/12/15.
 */
public class FizzBuzz {

    private static int FIZZ_VALUE = 3;
    private static int BUZZ_VALUE = 3;
    private static int ZERO_VALUE = 0;

    Predicate<Integer> fizzFilter = (value) -> (value.intValue() % FIZZ_VALUE == ZERO_VALUE);
    Predicate<Integer> buzzFilter = (value) -> (value.intValue() % BUZZ_VALUE == ZERO_VALUE);

    public void printCountDown(int maxCount) {
        List<Integer> counterList = retrieveArrayFromMaxValue(maxCount);
        counterList.stream().filter(fizzFilter).forEach((value) -> System.out.println(value));

    }

    public List<Integer> retrieveArrayFromMaxValue(int maxCount) {

        List<Integer> counterList = new ArrayList<>();

        IntStream.range(1,maxCount+1).forEach(val -> counterList.add(val));

        return counterList;

    }
}

@@ -123,50 +123,8 @@
 m;%0A%0A
-/**%0A * Created by ricardo on 1/12/15.%0A */%0A
 publ
@@ -315,27 +315,16 @@
 %3E (value
-.intValue()
  %25 FIZZ_
@@ -402,19 +402,8 @@
 alue
-.intValue()
  %25 B
@@ -549,16 +549,16 @@
 Count);%0A
+
         
@@ -640,25 +640,24 @@
 ln(value));%0A
-%0A
     %7D%0A%0A    p

Refactor code format