color chooser widget
[fanfix.git] / src / jexer / TCommand.java
index 62ff2bec9e22f37e09ef149c3a1ffab553e650f7..c0781eccf10e194fd8459a34a38b91f490c0009c 100644 (file)
@@ -1,4 +1,4 @@
-/**
+/*
  * Jexer - Java Text User Interface
  *
  * License: LGPLv3 or later
@@ -158,6 +158,16 @@ public class TCommand {
         return (type == that.type);
     }
 
+    /**
+     * Hashcode uses all fields in equals().
+     *
+     * @return the hash
+     */
+    @Override
+    public int hashCode() {
+        return type;
+    }
+
     public static final TCommand cmAbort      = new TCommand(ABORT);
     public static final TCommand cmExit       = new TCommand(EXIT);
     public static final TCommand cmQuit       = new TCommand(EXIT);