package de.paymill.net;

import java.util.HashMap;
import java.util.Map;

/**
 * A thin wrapper around a map object for declaring a list filter when querying
 * the webservice.
 */
public class Filter {

	private Map<String, Object> data;

	public Filter() {
		data = new HashMap<String, Object>();
	}

	/**
	 * Adds a new filter criteria.
	 * 
	 * @param key
	 * @param filter
	 */
	public void add(String key, Object filter) {
		data.put(key, filter);
	}

	public Map<String, Object> toMap() {
		return new HashMap<String, Object>(data);
	}
}

@@ -294,16 +294,108 @@
 t%3E();%0A%09%7D
+%0A%09%0A%09public Filter(Map%3CString, Object%3E data) %7B%0A%09%09data = new HashMap%3CString, Object%3E(data);%0A%09%7D
 %0A%0A%09/**%0A%09
@@ -463,16 +463,69 @@
  filter%0A
+%09 * @return this filter. Allows for method chaining.%0A
 %09 */%0A%09pu
@@ -533,12 +533,14 @@
 lic 
-void
+Filter
  add
@@ -594,16 +594,31 @@
 ilter);%0A
+%09%09return this;%0A
 %09%7D%0A%0A%09pub

Return instance from add for chaining. Add constructor that takes a map.