1 16 17 package org.apache.commons.betwixt.schema; 18 19 27 public class SimpleType { 28 private String name; 29 30 34 public String getName() { 35 return name; 36 } 37 38 42 public void setName(String name) { 43 this.name = name; 44 } 45 46 public boolean equals(Object obj) { 47 boolean result = false; 48 if (obj instanceof SimpleType) { 49 SimpleType simpleType = (SimpleType) obj; 50 result = isEqual(name, simpleType.name); 51 } 52 return result; 53 } 54 55 public int hashCode() { 56 return 0; 57 } 58 59 60 66 private boolean isEqual(String one, String two) { 67 boolean result = false; 68 if (one == null) { 69 result = (two == null); 70 } 71 else 72 { 73 result = one.equals(two); 74 } 75 76 return result; 77 } 78 79 public String toString() { 80 return "<xsd:simpleType name='" + name + "'/>"; 81 } 82 } 83 | Popular Tags |