1 21 22 package org.apache.commons.validator; 23 24 import java.io.Serializable ; 25 26 41 public class Arg implements Cloneable , Serializable { 42 43 48 protected String bundle = null; 49 50 53 protected String key = null; 54 55 58 protected String name = null; 59 60 65 protected int position = -1; 66 67 72 protected boolean resource = true; 73 74 78 public Object clone() { 79 try { 80 return super.clone(); 81 82 } catch(CloneNotSupportedException e) { 83 throw new RuntimeException (e.toString()); 84 } 85 } 86 87 91 public String getBundle() { 92 return this.bundle; 93 } 94 95 99 public String getKey() { 100 return this.key; 101 } 102 103 107 public String getName() { 108 return this.name; 109 } 110 111 115 public int getPosition() { 116 return this.position; 117 } 118 119 123 public boolean isResource() { 124 return this.resource; 125 } 126 127 132 public void setBundle(String bundle) { 133 this.bundle = bundle; 134 } 135 136 140 public void setKey(String key) { 141 this.key = key; 142 } 143 144 148 public void setName(String name) { 149 this.name = name; 150 } 151 152 156 public void setPosition(int position) { 157 this.position = position; 158 } 159 160 164 public void setResource(boolean resource) { 165 this.resource = resource; 166 } 167 168 172 public String toString() { 173 StringBuffer results = new StringBuffer (); 174 175 results.append("Arg: name="); 176 results.append(name); 177 results.append(" key="); 178 results.append(key); 179 results.append(" position="); 180 results.append(position); 181 results.append(" bundle="); 182 results.append(bundle); 183 results.append(" resource="); 184 results.append(resource); 185 results.append("\n"); 186 187 return results.toString(); 188 } 189 190 } | Popular Tags |