1 17 18 package com.finalist.jag.skelet; 19 20 21 import java.util.*; 22 23 24 31 public class ModuleData { 32 33 34 private static final short COLLECTION = 1; 35 36 37 private static final short STRING = 2; 38 39 40 private String name; 41 42 43 private Object value; 44 45 46 private short valueType; 47 48 49 57 public ModuleData(String name, String value) { 58 setName(name); 59 setValue(value); 60 } 61 62 63 71 public ModuleData(String name, Collection value) { 72 setName(name); 73 setValue(value); 74 } 75 76 77 84 public String getName() { 85 return (this.name); 86 } 87 88 89 96 public void setName(String name) { 97 this.name = name; 98 } 99 100 101 108 public Object getValue() { 109 return (this.value); 110 } 111 112 113 120 public void setValue(String value) { 121 this.valueType = STRING; 122 this.value = value; 123 } 124 125 126 133 public void setValue(Collection value) { 134 this.valueType = COLLECTION; 135 this.value = value; 136 } 137 138 139 146 public boolean isValueCollection() { 147 return this.valueType == COLLECTION; 148 } 149 150 151 158 public boolean isValueString() { 159 return this.valueType == STRING; 160 } 161 } | Popular Tags |