@@ -0,0 +1,1748 @@
+package org.granite.base;%0A%0Aimport static com.google.common.base.Preconditions.checkNotNull;%0A%0Aimport java.util.Comparator;%0A%0Apublic class KeyValue%3CK, V%3E %7B%0A%0A    private K key;%0A    private V value;%0A%0A    public KeyValue() %7B%0A    %7D%0A%0A    public KeyValue(K key, V value) %7B%0A        this.key = key;%0A        this.value = value;%0A    %7D%0A%0A    public K getKey() %7B%0A        return key;%0A    %7D%0A%0A    public V getValue() %7B%0A        return value;%0A    %7D%0A%0A    public void setKey(K key) %7B%0A        this.key = key;%0A    %7D%0A%0A    public void setValue(V value) %7B%0A        this.value = value;%0A    %7D%0A%0A    @Override%0A    public boolean equals(Object obj) %7B%0A        return obj instanceof KeyValue%0A            && getKey().equals(((KeyValue) obj).getKey());%0A    %7D%0A%0A    @Override%0A    public int hashCode() %7B%0A        return getKey().hashCode();%0A    %7D%0A%0A    public static class ValueComparator%3CK, V%3E implements Comparator%3CKeyValue%3CK, V%3E%3E %7B%0A%0A        private final Comparator%3CV%3E valueComparator;%0A%0A        public ValueComparator(final Comparator%3CV%3E valueComparator) %7B%0A            this.valueComparator = checkNotNull(valueComparator, %22valueComparator%22);%0A        %7D%0A%0A        @Override%0A        public int compare(KeyValue%3CK, V%3E o1, KeyValue%3CK, V%3E o2) %7B%0A            return valueComparator.compare(o1.getValue(), o2.getValue());%0A        %7D%0A    %7D%0A%0A    public static class KeyComparator%3CK, V%3E implements Comparator%3CKeyValue%3CK, V%3E%3E %7B%0A%0A        private Comparator%3CK%3E keyComparator;%0A%0A        public KeyComparator(final Comparator%3CK%3E keyComparator) %7B%0A            this.keyComparator = checkNotNull(keyComparator, %22keyComparator%22);%0A        %7D%0A%0A        @Override%0A        public int compare(KeyValue%3CK, V%3E o1, KeyValue%3CK, V%3E o2) %7B%0A            return keyComparator.compare(o1.getKey(), o2.getKey());%0A        %7D%0A    %7D%0A%7D%0A

Add a basic key-value class