Skip to content

Instantly share code, notes, and snippets.

View lordk911's full-sized avatar
🎯
Focusing

Kevin.Shin lordk911

🎯
Focusing
  • beijing
View GitHub Profile
@lordk911
lordk911 / test.java
Created January 8, 2019 02:51
map key value 换位
private <T> Map<T,T> filp(Map<T,T> m) {
Set<T> keys = m.keySet();
Map<T,T> m2 = new HashMap<T,T>();
for (T key : keys) {
T value = m.get(key);
m2.put(value, key);
}
return m2;
}
import com.github.mustachejava.DefaultMustacheFactory;
import com.github.mustachejava.Mustache;
import com.github.mustachejava.MustacheFactory;
import com.github.mustachejava.reflect.MissingWrapper;
import com.github.mustachejava.reflect.ReflectionObjectHandler;
import com.github.mustachejava.util.Wrapper;
import java.io.IOException;
import java.io.PrintWriter;
import java.io.StringReader;