1 /*
2 * Copyright �, Aegeus Technology Limited.
3 * All rights reserved.
4 */
5 package jsdsi.util;
6
7 import java.io.Serializable;
8
9
10 /***
11 * <p>Experimental class and as such may be removed without warning.</p>
12 *
13 * Abstract Enum class for algorithms
14 *
15 * @author Sean Radford
16 * @version $Revision: 1.3 $ $Date: 2004/11/08 12:08:08 $
17 */
18 public abstract class AlgorithmEnum implements Serializable {
19
20 /***
21 * The JDK name for this algorythm
22 */
23 private String jdkName;
24
25 /***
26 * The SPKI (SEXP) name for this algorythm
27 */
28 private String spkiName;
29
30 /***
31 *
32 */
33 protected AlgorithmEnum(String jdkName, String spkiName) {
34 super();
35 this.jdkName = jdkName;
36 this.spkiName = spkiName;
37 }
38
39 public String jdkName() {
40 return this.jdkName;
41 }
42
43 public String spkiName() {
44 return this.spkiName;
45 }
46
47 /***
48 * @see java.lang.Object#equals(java.lang.Object)
49 */
50 public boolean equals(Object obj) {
51 if (obj instanceof AlgorithmEnum) {
52 AlgorithmEnum other = (AlgorithmEnum) obj;
53 return (this.spkiName.equals(other.spkiName));
54 }
55 return false;
56 }
57
58 /***
59 * @see java.lang.Object#hashCode()
60 */
61 public int hashCode() {
62 return this.spkiName.hashCode();
63 }
64
65 /***
66 * @see java.lang.Object#toString()
67 */
68 public String toString() {
69 return this.spkiName;
70 }
71
72 }
This page was automatically generated by Maven