1 17 18 package com.finalist.jag.taglib; 19 20 21 import java.util.Collection ; 22 23 24 31 public class AttributeDef { 32 33 34 private String name = null; 35 36 37 private boolean required = false; 38 39 40 45 public AttributeDef() { 46 } 47 48 49 56 public AttributeDef(AttributeDef n) { 57 this.name = n.name; 58 this.required = n.required; 59 } 60 61 62 69 public void setName(String name) { 70 this.name = name; 71 } 72 73 74 81 public void setRequired(boolean required) { 82 this.required = required; 83 } 84 85 86 93 public void setRequired(String required) { 94 95 this.required = !((required == null) 96 || required.equalsIgnoreCase("false") 97 || required.equalsIgnoreCase("0")); 98 } 99 100 101 108 public String getName() { 109 return (this.name); 110 } 111 112 113 120 public boolean getRequired() { 121 return (this.required); 122 } 123 124 125 132 public String toString() { 133 StringBuffer toString = new StringBuffer (); 134 toString.append("\name : "); 135 toString.append(name); 136 toString.append("\required : "); 137 toString.append(required); 138 139 return new String (toString); 140 } 141 } | Popular Tags |