Skip to content

Instantly share code, notes, and snippets.

@wsoczynski
Created March 16, 2013 21:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wsoczynski/5178440 to your computer and use it in GitHub Desktop.
Save wsoczynski/5178440 to your computer and use it in GitHub Desktop.
public class Sample {
public List<Double> allEvenNumberToSecondPower(List<Integer> input) {
EvenFilter evenFilter = new EvenFilter();
PowerFunction powerFunction = new PowerFunction(2);
ImmutableList<Double> result = FluentIterable.from(input).
filter(evenFilter).
transform(powerFunction).
toList();
return newArrayList(result);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment