1 23 24 package org.apache.slide.common; 25 27 import org.apache.slide.content.NodeProperty; 28 29 34 public class RequestedPropertyImpl implements RequestedProperty { 35 36 protected String namespace; 37 private String propertyName; 38 39 45 public RequestedPropertyImpl (String propertyName) { 46 this.propertyName = propertyName; 47 this.namespace = NodeProperty.DEFAULT_NAMESPACE; 48 } 49 50 56 public RequestedPropertyImpl (String propertyName, String namespace) { 57 this.propertyName = propertyName; 58 this.namespace = namespace; 59 } 60 61 62 67 public String getPropertyName() { 68 return propertyName; 69 } 70 71 72 77 public String getNamespace() { 78 return namespace; 79 } 80 81 87 public String getName() { 88 return propertyName; 89 } 90 91 98 public boolean equals (Object o) { 99 if (! (o instanceof RequestedProperty)) 100 return false; 101 RequestedProperty other = (RequestedProperty)o; 102 if (!namespace.equals (other.getNamespace())) 103 return false; 104 if (!propertyName.equals (other.getName())) 105 return false; 106 return true; 107 } 108 109 114 public String toString () { 115 return namespace + propertyName; 116 } 117 118 public int hashCode() { 119 return toString().hashCode(); 120 } 121 122 } 123 | Popular Tags |