@@ -0,0 +1,1636 @@
+package com.damienfremont.blog;%0A%0Aimport java.io.File;%0Aimport java.io.IOException;%0Aimport java.net.URL;%0Aimport java.util.ArrayList;%0Aimport java.util.List;%0A%0Aimport com.google.common.base.Charsets;%0Aimport com.google.common.base.Function;%0Aimport com.google.common.base.Preconditions;%0Aimport com.google.common.base.Predicate;%0Aimport com.google.common.base.Strings;%0Aimport com.google.common.base.Throwables;%0Aimport com.google.common.collect.Collections2;%0Aimport com.google.common.collect.Lists;%0Aimport com.google.common.io.Files;%0Aimport com.google.common.io.Resources;%0A%0A// STABLE: GUAVA UTILS%0A// FAST: GUAVA IMPL%0Apublic class Java6GuavaImpl implements Features %7B%0A%0A%09public boolean condition(String arg) %7B%0A%09%09return !Strings.nullToEmpty(arg).trim().isEmpty();%0A%09%7D%0A%0A%09public void check(String arg) %7B%0A%09%09Preconditions.checkArgument(condition(arg));%0A%09%7D%0A%0A%09public List%3CString%3E filter(List%3CString%3E input) %7B%0A%09%09return new ArrayList(Collections2.filter(input,%0A%09%09%09%09new Predicate%3CString%3E() %7B%0A%09%09%09%09%09public boolean apply(String input) %7B%0A%09%09%09%09%09%09return condition(input);%0A%09%09%09%09%09%7D%0A%09%09%09%09%7D));%0A%09%7D%0A%0A%09public List%3CString%3E map(List%3CString%3E input) %7B%0A%09%09return Lists.transform(input, new Function%3CString, String%3E() %7B%0A%09%09%09public String apply(String input) %7B%0A%09%09%09%09return input.toUpperCase();%0A%09%09%09%7D%0A%09%09%7D);%0A%09%7D%0A%0A%09public void errorHandling(Exception e) %7B%0A%09%09throw Throwables.propagate(e);%0A%09%7D%0A%0A%09public String loadFile(String path) throws IOException %7B%0A%09%09File file = new File(path);%0A%09%09return Files.toString(file, Charsets.UTF_8);%0A%09%7D%0A%0A%09public String loadResource(String name) throws IOException %7B%0A%09%09URL url = Resources.getResource(name);%0A%09%09return Resources.toString(url, Charsets.UTF_8);%0A%09%7D%0A%7D%0A

Create Java6GuavaImpl.java