Produces a flagged key/value pair list given a flag name and a {@link Map}.

@return {@code [--flagName, key1=value1, --flagName, key2=value2, ...]} or {@code []} if
keyValueMapping=empty/null
778503
static List<String> flaggedKeyValues(final String flagName, @Nullable Map<?, ?> keyValueMapping) {
    List<String> result = Lists.newArrayList();
    if (keyValueMapping != null && keyValueMapping.size() > 0) {
      for (Map.Entry<?, ?> entry : keyValueMapping.entrySet()) {
        result.addAll(string(flagName, entry.getKey() + "=" + entry.getValue()));
      }

      return result;
    }

    return Collections.emptyList();
  }
913595
public Keys<K> keys () {
		if (keys1 == null) {
			keys1 = new OrderedMapKeys(this);
			keys2 = new OrderedMapKeys(this);
		}
		if (!keys1.valid) {
			keys1.reset();
			keys1.valid = true;
			keys2.valid = false;
			return keys1;
		}
		keys2.reset();
		keys2.valid = true;
		keys1.valid = false;
		return keys2;
	}
674080
public List<String> get(String key)
    {
        if(key == null)
            throw new IllegalArgumentException("Null keys not allowed.");

        return map.get(key);
    }
889759
public static <K, E> List<E> getAndPutListIfAbsent(final Map<K, List<E>> map, final K key) {
        List<E> v = map.get(key);

        if (v == null) {
            v = new ArrayList<>();
            v = map.put(key, v);
        }

        return v;
    }
1140889
public static Map<Object,Object> parse(List<String>   args)
	{
		final short START =1, VAL=2;
		short state = START;
		Map<Object,Object> map = new HashMap<>(args.size());
		
		String key=null,value=null;
		for (String arg : args)
		{
			arg = arg.trim();
			
			switch(state)
			{
				case START: 
					
					if(arg.startsWith("-"))
						arg = Text.replaceForRegExprWith(arg, "^-*", "");
					
					if(arg.contains("="))
					{
						String[] tokens = Text.splitRE(arg, "=");
						if(tokens.length == 2)
						{
							key = tokens[0];
							value = tokens[1];
							
							map.put(key, formatValue(value));
							
							state = START;
						}
					}
					else
					{
						key = arg;
						state = VAL;
					}
					
					System.out.println("key:"+key);
					
					
				break;
				case VAL: 
					
					map.put(key, formatValue(arg));
					state = START;
				break;
			 	default: throw new RuntimeException("Unknown message:");
			}
		}
		
		
		return map;
	}
628427
public static String flagNames(long flags) {
        StringBuilder sbuf = new StringBuilder();
        int i = 0;
        long f = flags & StandardFlags;
        while (f != 0) {
            if ((f & 1) != 0) {
                sbuf.append(" ");
                sbuf.append(flagName[i]);
            }
            f = f >> 1;
            i++;
        }
        return sbuf.toString();
    }
849045
public HashMap<String,Object> getValueMap()
  {
    try {
      if (_values == null) {
        _values = new HashMap<String,Object>();

        Method []methods = _ann.annotationType().getMethods();

        for (int i = 0; i < methods.length; i++) {
          Method method = methods[i];

          if (method.getDeclaringClass().equals(Class.class))
            continue;
          if (method.getDeclaringClass().equals(Object.class))
            continue;
          if (method.getParameterTypes().length != 0)
            continue;

          _values.put(method.getName(), method.invoke(_ann));
        }
      }

      return _values;
    } catch (Exception e) {
      throw new RuntimeException(e);
    }
  }
641081
@Override
    public Map<String, String> getValues() {
        HashMap<String, String> result = new HashMap<>();

        if (BeforeDate != null) result.put("BeforeDate", Long.toString(BeforeDate));
        if (AfterDate != null) result.put("AfterDate", Long.toString(AfterDate));

        return result;
    }
417297
@NullSafe
  @Override
  public Iterator<VALUE> iterator() {
    return Collections.unmodifiableMap(this.map).values().iterator();
  }
156277
public static Headers of(Map<String, String> headers) {
        if (headers == null) throw new NullPointerException("headers == null");

        // Make a defensive copy and clean it up.
        String[] namesAndValues = new String[headers.size() * 2];
        int i = 0;
        for (Map.Entry<String, String> header : headers.entrySet()) {
            if (header.getKey() == null || header.getValue() == null) {
                throw new IllegalArgumentException("Headers cannot be null");
            }
            String name = header.getKey().trim();
            String value = header.getValue().trim();
            if (name.length() == 0 || name.indexOf('\0') != -1 || value.indexOf('\0') != -1) {
                throw new IllegalArgumentException("Unexpected header: " + name + ": " + value);
            }
            namesAndValues[i] = name;
            namesAndValues[i + 1] = value;
            i += 2;
        }

        return new Headers(namesAndValues);
    }
98092
public Map<K, List<V>> asMap() {
		Map<K, List<V>> view = new LinkedHashMap<K, List<V>>(map.size());
		for (Map.Entry<K, List<V>> entry : map.entrySet()) {
			K key = entry.getKey();
			List<V> value = entry.getValue();
			view.put(key, Collections.unmodifiableList(value));
		}
		return Collections.unmodifiableMap(view);
	}
621629
public synchronized Set<String> getNames() {
        if (map == null) {
            return Collections.emptySet();
        }
        return Collections.unmodifiableSet(map.keySet());
    }
919589
public HashMap<K2, HashMap<K3, V>> get(final K1 firstKey) {
		return map.get(firstKey);
	}
507252
public static StringValueMap fromMaps(Map<?, ?>... maps) {
		StringValueMap result = new StringValueMap();
		if (maps != null && maps.length > 0) {
			for (Map<?, ?> map : maps)
				result.append(map);
		}
		return result;
	}
599722
public List<String> getValueList(String key) {
        Objects.requireNonNull(key, Required.KEY.toString());
        
        return this.valueMap.get(key);
    }
561597
int[] getKeys()
    {
        Set<Integer> keySet = map.keySet();
        int keys[] = new int[keySet.size()];
        int index = 0;
        for (Integer key : keySet)
        {
            keys[index] = key;
            index++;
        }
        return keys;
    }
1344769
@Override
  public HashMap<String, String> getValuesMap() {
    if (optionsHolder == null ) return null;
    else return optionsHolder.getOptionsMap();
  }