1 7 package org.jboss.cache.pojo.test; 8 9 import java.util.ArrayList ; 10 import java.util.List ; 11 12 19 @org.jboss.cache.pojo.annotation.Replicable 21 public class NetworkNode 22 { 23 String name_; 24 List elements_; 25 String ipAddress_; 26 27 public String getName() 28 { 29 return name_; 30 } 31 32 public void setName(String name) 33 { 34 name_ = name; 35 } 36 37 public List getElements() 38 { 39 return elements_; 40 } 41 42 protected void setElements(List elements) 43 { 44 elements_ = elements; 45 } 46 47 public void addElement(NetworkElement element) 48 { 49 if (elements_ == null) 50 elements_ = new ArrayList (); 51 52 elements_.add(element); 53 element.setParentNode(this); 54 } 55 56 public String getIpAddress() 57 { 58 return ipAddress_; 59 } 60 61 public void setIpAddress(String ipAddress) 62 { 63 ipAddress_ = ipAddress; 64 } 65 66 public String toString() 67 { 68 StringBuffer sb = new StringBuffer (); 69 sb.append(" name= ").append(getName()).append(" ipAddress= ").append(getIpAddress()); 70 sb.append(" elements=").append(getElements()); 71 return sb.toString(); 72 } 73 74 } 75 | Popular Tags |