@SuppressWarnings("unchecked")
	public LinkedHashMap<K, V> parse(Object... args) throws ClassCastException, IllegalArgumentException {
		LinkedHashMap<K, V> attrs = new LinkedHashMap<K, V>();

		if (args.length % 2 != 0) {
			throw new IllegalArgumentException("Odd number of elements in varargs map!");
		}

		K key = null;
		for (Object o : args) {
			if (key == null) {
				if (o == null) throw new RuntimeException("Key cannot be NULL in varargs map.");
				key = (K) o;
			} else {
				attrs.put(key, (V) o);
				key = null;
			}
		}

		return attrs;
	}