1 23 package com.sun.enterprise.repository; 24 25 import java.io.Serializable ; 26 27 public class ResourcePropertyImpl implements ResourceProperty, 28 Serializable { 29 30 private String name_; 31 private Object value_; 32 33 public ResourcePropertyImpl(String name) { 34 name_ = name; 35 value_ = null; 36 } 37 38 public ResourcePropertyImpl(String name, Object value) { 39 name_ = name; 40 value_ = value; 41 } 42 43 public String getName() { 44 return name_; 45 } 46 47 public Object getValue() { 48 return value_; 49 } 50 51 public void setValue(Object value) { 52 value_ = value; 53 } 54 55 public int hashCode() { 56 return name_.hashCode(); 57 } 58 59 public boolean equals(Object other) { 60 boolean equal = false; 61 if( other instanceof ResourceProperty ) { 62 ResourceProperty otherProp = (ResourceProperty) other; 63 equal = this.name_.equals(otherProp.getName()); 64 } 65 return equal; 66 } 67 68 public String toString() { 69 return "ResourceProperty : < " + getName() + " , " + getValue() + 70 " >"; 71 } 72 73 } 74 | Popular Tags |