1 19 20 package org.netbeans.modules.websvc.wsitconf.ui.security.listmodels; 21 22 public abstract class TargetElement extends Object { 23 24 public static final int DATA = 0; 25 public static final int SIGN = 1; 26 public static final int ENCRYPT = 2; 27 public static final int REQUIRE = 3; 28 29 protected String element; 30 31 public TargetElement(String element) { 32 this.element = element; 33 } 34 35 @Override 36 public String toString() { 37 return element; 38 } 39 40 @Override 41 public boolean equals(Object obj) { 42 if (obj instanceof TargetElement) { 43 return ((TargetElement)obj).toString().equals(element); 44 } 45 return false; 46 } 47 48 @Override 49 public int hashCode() { 50 return element.hashCode(); 51 } 52 53 } | Popular Tags |