keyboard accelerators
[fanfix.git] / src / jexer / bits / Cell.java
index 3c0eb14a04a4c0969b4a778b6d54050379a2c89d..511963c28ac23c0f458addcafc56090bb7697bb8 100644 (file)
@@ -107,6 +107,21 @@ public final class Cell extends CellAttributes {
             && (ch == that.ch));
     }
 
+    /**
+     * Hashcode uses all fields in equals().
+     *
+     * @return the hash
+     */
+    @Override
+    public int hashCode() {
+        int A = 13;
+        int B = 23;
+        int hash = A;
+        hash = (B * hash) + super.hashCode();
+        hash = (B * hash) + (int)ch;
+        return hash;
+    }
+
     /**
      * Set my field values to that's field.
      *