1 17 package org.apache.ws.jaxme; 18 19 import javax.xml.namespace.QName ; 20 21 26 public class WildcardAttribute { 27 private final QName name; 28 private final String value; 29 30 34 public WildcardAttribute(QName pName, String pValue) { 35 if (pName == null) { 36 throw new NullPointerException ("A wildcard attributes name must not be null."); 37 } 38 if (pValue == null) { 39 throw new NullPointerException ("A wildcard attributes value must not be null."); 40 } 41 name = pName; 42 value = pValue; 43 } 44 45 47 public QName getName() { 48 return name; 49 } 50 51 53 public String getValue() { 54 return value; 55 } 56 57 public String toString() { 58 return name + "=" + value; 59 } 60 61 63 public int hashCode() { 64 return name.hashCode(); 65 } 66 67 70 public boolean equals(Object pOther) { 71 return pOther != null && pOther instanceof WildcardAttribute && 72 ((WildcardAttribute) pOther).name.equals(name); 73 } 74 } 75 | Popular Tags |