HELLO WORLD...
[nikiroo-utils.git] / src / jexer / TCommand.java
index 0a3890352ebfa0027817df610c10e91f11d5b62a..ce19e2a06233f0e9097aded7b11fdc4ada0b9303 100644 (file)
@@ -144,6 +144,19 @@ public class TCommand {
        return String.format("%s", type);
     }
 
+    /**
+     * Comparison.  All fields must match to return true.
+     */
+    @Override
+    public boolean equals(Object rhs) {
+       if (!(rhs instanceof TCommand)) {
+           return false;
+       }
+
+       TCommand that = (TCommand)rhs;
+       return (type == that.type);
+    }
+
     static public final TCommand cmAbort      = new TCommand(TCommand.Type.ABORT);
     static public final TCommand cmExit       = new TCommand(TCommand.Type.EXIT);
     static public final TCommand cmQuit       = new TCommand(TCommand.Type.EXIT);