feat: intent task

This commit is contained in:
hyb1996
2018-09-28 13:46:01 +08:00
parent 025e594a01
commit 02b1587f6b
19 changed files with 359 additions and 137 deletions

View File

@@ -0,0 +1,37 @@
package com.stardust.util;
import java.util.HashMap;
import java.util.Map;
/**
* Created by Stardust on 2017/1/26.
*/
public class MapBuilder<K, V> {
private Map<K, V> mMap;
public MapBuilder() {
this(new HashMap<K, V>());
}
public MapBuilder(Map<K, V> map) {
mMap = map;
}
public MapBuilder<K, V> put(K key, V value) {
mMap.put(key, value);
return this;
}
public Map<K, V> build() {
return mMap;
}
public Map<K, V> putIn(Map<K, V> map) {
map.putAll(mMap);
return map;
}
}