@@ -0,0 +1,1790 @@
+/**%0A * Copyright %C2%A9 2014  Mattias Andr%C3%A9e (maandree@member.fsf.org)%0A * %0A * This program is free software: you can redistribute it and/or modify%0A * it under the terms of the GNU Affero General Public License as published by%0A * the Free Software Foundation, either version 3 of the License, or%0A * (at your option) any later version.%0A * %0A * This program is distributed in the hope that it will be useful,%0A * but WITHOUT ANY WARRANTY; without even the implied warranty of%0A * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the%0A * GNU Affero General Public License for more details.%0A * %0A * You should have received a copy of the GNU Affero General Public License%0A * along with this program.  If not, see %3Chttp://www.gnu.org/licenses/%3E.%0A */%0Apackage datastructures.linkedlists;%0A%0A%0A/**%0A * Value type that can be stored in linked lists%0A * to turn them in to association lists.%0A * %0A * @param  %3CK%3E  The type of the key of the node%0A * @param  %3CV%3E  The type of the value associated with the key%0A */%0Apublic class Association%3CK, V%3E%0A%7B%0A    /**%0A     * Constructor%0A     * %0A     * @param  key    The key of the node%0A     * @param  value  The value associated with the key%0A     */%0A    public Association(K key, V value)%0A    %7B%0A%09this.key = key;%0A%09this.value = value;%0A    %7D%0A    %0A    %0A    %0A    /**%0A     * The key of the node%0A     */%0A    public K key;%0A    %0A    /**%0A     * The value associated with the key%0A     */%0A    public V value;%0A    %0A    %0A    %0A    /**%0A     * %7B@inheritDoc%7D%0A     */%0A    @Override%0A    public boolean equals(Object other)%0A    %7B%0A%09if ((this.key == null) %7C%7C (other == null))%0A%09    return (this.key == null) && (other == null);%0A%09return this.key.equals(other);%0A    %7D%0A    %0A    /**%0A     * %7B@inheritDoc%7D%0A     */%0A    @Override%0A    public int hashCode()%0A    %7B%0A%09return this.key.hashCode();%0A    %7D%0A    %0A%7D%0A%0A

add linked list to association list converter