package net.acomputerdog.core.hash;

public class Hasher {
    private int currentHashValue;

    public Hasher() {
        currentHashValue = Hash.SEED;
    }

    public Hasher hash(Object val) {
        currentHashValue = Hash.hash(currentHashValue, val);
        return this;
    }

    public Hasher hash(int val) {
        currentHashValue = Hash.hash(currentHashValue, val);
        return this;
    }

    public Hasher hash(byte val) {
        currentHashValue = Hash.hash(currentHashValue, val);
        return this;
    }

    public Hasher hash(short val) {
        currentHashValue = Hash.hash(currentHashValue, val);
        return this;
    }

    public Hasher hash(long val) {
        currentHashValue = Hash.hash(currentHashValue, val);
        return this;
    }

    public Hasher hash(boolean val) {
        currentHashValue = Hash.hash(currentHashValue, val);
        return this;
    }

    public Hasher hash(float val) {
        currentHashValue = Hash.hash(currentHashValue, val);
        return this;
    }

    public Hasher hash(double val) {
        currentHashValue = Hash.hash(currentHashValue, val);
        return this;
    }

    public Hasher hash(char val) {
        currentHashValue = Hash.hash(currentHashValue, val);
        return this;
    }

    @Override
    public int hashCode() {
        return currentHashValue;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) return false;
        if (obj == this) return true;
        if (!(obj instanceof Hasher)) return false;
        return currentHashValue == ((Hasher) obj).currentHashValue;
    }

    @Override
    public String toString() {
        return "Hasher{" + currentHashValue + "}";
    }
}

@@ -34,131 +34,527 @@
 h;%0A%0A
-public class Hasher %7B%0A    private int currentHashValue;%0A%0A    public Hasher() %7B%0A        currentHashValue = Hash.SEED;%0A    %7D%0A
+/**%0A * Utility class to assist with calculating HashCodes.%0A * Use like:%0A * public int hashCode() %7B%0A * return new Hasher().hash(val1).hash(val2).hash(val3).hashCode();%0A * %7D%0A */%0Apublic class Hasher %7B%0A    /**%0A     * The current accumulated value of this Hasher%0A     */%0A    private int currentHashValue;%0A%0A    /**%0A     * Creates a new Hasher%0A     */%0A    public Hasher() %7B%0A        currentHashValue = Hash.SEED;%0A    %7D%0A%0A    /**%0A     * Hash an Object%0A     * @param val the value to hash%0A     * @return Return this hasher%0A     */
 %0A   
@@ -668,32 +668,137 @@
 rn this;%0A    %7D%0A%0A
+    /**%0A     * Hash an int%0A     * @param val the value to hash%0A     * @return Return this hasher%0A     */%0A
     public Hashe
@@ -896,32 +896,137 @@
 rn this;%0A    %7D%0A%0A
+    /**%0A     * Hash a byte%0A     * @param val the value to hash%0A     * @return Return this hasher%0A     */%0A
     public Hashe
@@ -1125,32 +1125,138 @@
 rn this;%0A    %7D%0A%0A
+    /**%0A     * Hash a short%0A     * @param val the value to hash%0A     * @return Return this hasher%0A     */%0A
     public Hashe
@@ -1356,32 +1356,137 @@
 rn this;%0A    %7D%0A%0A
+    /**%0A     * Hash a long%0A     * @param val the value to hash%0A     * @return Return this hasher%0A     */%0A
     public Hashe
@@ -1585,32 +1585,140 @@
 rn this;%0A    %7D%0A%0A
+    /**%0A     * Hash a boolean%0A     * @param val the value to hash%0A     * @return Return this hasher%0A     */%0A
     public Hashe
@@ -1820,32 +1820,138 @@
 rn this;%0A    %7D%0A%0A
+    /**%0A     * Hash a float%0A     * @param val the value to hash%0A     * @return Return this hasher%0A     */%0A
     public Hashe
@@ -2051,32 +2051,139 @@
 rn this;%0A    %7D%0A%0A
+    /**%0A     * Hash a double%0A     * @param val the value to hash%0A     * @return Return this hasher%0A     */%0A
     public Hashe
@@ -2288,24 +2288,129 @@
 his;%0A    %7D%0A%0A
+    /**%0A     * Hash a char%0A     * @param val the value to hash%0A     * @return Return this hasher%0A     */%0A
     public H

Comment Hasher