Java Utililty Methods Map Join

List of utility methods to do Map Join

Description

The list of methods to do Map Join are organized into topic(s).

Method

voidjoin(final long timeout, final Map throwableMap, final Thread... threads)
Wait on each thread, individually, for timeout milliseconds.
for (final Thread t : threads) {
    Throwable error = null;
    try {
        t.join(timeout);
        if (t.isAlive()) {
            error = new AssertionError("Thread did not complete in timeout: " + timeout);
    } catch (final InterruptedException e) {
...
Mapjoin(final Map map1, final Map map2, final Map... maps)
join
return new HashMap<K, V>() {
        putAll(map1);
        putAll(map2);
        for (Map<? extends K, ? extends V> map : maps) {
            putAll(map);
};
Map[]join(final Map add, final Map... imports)
join
final Map<?, ?>[] result = new Map<?, ?>[imports == null ? 1 : imports.length + 1];
result[0] = add;
for (int i = 0; imports != null && i < imports.length; i++)
    result[i + 1] = imports[i];
return result;
Mapjoin(List> list)
join
if (list == null) {
    return null;
Map<K, V> result = new HashMap<K, V>();
for (int i = 0; i < list.size(); i++) {
    Map<K, V> map = list.get(i);
    if (map != null) {
        result.putAll(map);
...
StringJoin(Map map, String entryGlue, String elementGlue)
Joins a map together (using StringBuilder's {
return Join(map, entryGlue, elementGlue, null, null, null);
voidjoin(Map dst, Map src)
join
Map<Object, Object> dstMap = (Map<Object, Object>) dst;
Map<Object, Object> srcMap = (Map<Object, Object>) src;
Set<Object> srcKeySet = srcMap.keySet();
for (Object srcKey : srcKeySet) {
    Object srcValue = src.get(srcKey);
    Object dstValue = dst.get(srcKey);
    if (srcValue != null) {
        if (dstValue != null) {
...
Listjoin(Map map, String separator)
join
if (map == null) {
    return null;
List<String> list = new ArrayList<String>();
if (map == null || map.size() == 0) {
    return list;
for (Map.Entry<String, String> entry : map.entrySet()) {
...
Map>joinAll(Map> map, String separator)
join All
if (map == null) {
    return null;
Map<String, List<String>> result = new HashMap<String, List<String>>();
for (Map.Entry<String, Map<String, String>> entry : map.entrySet()) {
    result.put(entry.getKey(), join(entry.getValue(), separator));
return result;
...
StringjoinArgs(Map map, String sep, String split)
join Args
StringBuilder sb = new StringBuilder();
for (String key : map.keySet()) {
    sb.append(key);
    sb.append(split);
    sb.append(map.get(key));
    sb.append(sep);
if (sb.length() > 0) {
...
StringjoinLookup(Iterable elements, String separator, Map lookup)
join Lookup
if (elements == null)
    return "";
StringBuilder buf = new StringBuilder();
if (separator == null)
    separator = " ";
for (Object o : elements) {
    if (buf.length() > 0)
        buf.append(separator);
...