1 21 22 package org.apache.commons.validator; 23 24 import java.io.Serializable ; 25 26 32 public class Msg implements Cloneable , Serializable { 33 34 39 protected String bundle = null; 40 41 44 protected String key = null; 45 46 49 protected String name = null; 50 51 57 protected boolean resource = true; 58 59 63 public String getBundle() { 64 return this.bundle; 65 } 66 67 72 public void setBundle(String bundle) { 73 this.bundle = bundle; 74 } 75 76 79 public String getName() { 80 return name; 81 } 82 83 86 public void setName(String name) { 87 this.name = name; 88 } 89 90 93 public String getKey() { 94 return key; 95 } 96 97 100 public void setKey(String key) { 101 this.key = key; 102 } 103 104 109 public boolean isResource() { 110 return this.resource; 111 } 112 113 118 public void setResource(boolean resource) { 119 this.resource = resource; 120 } 121 122 125 public Object clone() { 126 try { 127 return super.clone(); 128 129 } catch(CloneNotSupportedException e) { 130 throw new RuntimeException (e.toString()); 131 } 132 } 133 134 137 public String toString() { 138 StringBuffer results = new StringBuffer (); 139 140 results.append("Msg: name="); 141 results.append(name); 142 results.append(" key="); 143 results.append(key); 144 results.append(" resource="); 145 results.append(resource); 146 results.append(" bundle="); 147 results.append(bundle); 148 results.append("\n"); 149 150 return results.toString(); 151 } 152 153 } | Popular Tags |