KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > thaiopensource > validate > nrl > Action


1 package com.thaiopensource.validate.nrl;
2
3 abstract class Action {
4   private final ModeUsage modeUsage;
5
6    Action(ModeUsage modeUsage) {
7      this.modeUsage = modeUsage;
8    }
9
10    ModeUsage getModeUsage() {
11      return modeUsage;
12    }
13
14    public boolean equals(Object JavaDoc obj) {
15      return obj != null && obj.getClass() == getClass() && ((Action)obj).modeUsage.equals(modeUsage);
16    }
17
18   public int hashCode() {
19     return getClass().hashCode() ^ modeUsage.hashCode();
20   }
21 }
22
Popular Tags