Blame |
Last modification |
View Log
| RSS feed
package dongfang.mkt.configuration;
public class DynamicByteEntry
extends StaticByteEntry
{
int minValue =
0;
int maxValue =
255;
String staticCodeName
;
String dynamicCodeName
;
DynamicByteEntry
(String name
) {
super(name
);
}
int getMinValue
() {
return minValue
;
}
int getMaxValue
() {
return maxValue
;
}
void setMinValue
(int minValue
) {
this.
minValue = minValue
;
}
void setMaxValue
(int maxValue
) {
this.
maxValue = maxValue
;
}
String getStaticCodeName
() {
return staticCodeName
;
}
String getDynamicCodeName
() {
return dynamicCodeName
;
}
void setStaticCodeName
(String staticCodeName
) {
this.
staticCodeName = staticCodeName
;
}
void setDynamicCodeName
(String dynamicCodeName
) {
this.
dynamicCodeName = dynamicCodeName
;
}
void toXML
(StringBuilder result
) {
String s_value
;
int numberOfLowestVariable =
256 - ParameterSet.
NUMBER_OF_VARIABLES;
if (value
>= numberOfLowestVariable
) {
s_value =
"var" +
(value - numberOfLowestVariable
);
} else
s_value =
Integer.
toString(value
);
result.
append(" <parameter name=\"" + name +
"\" value=\""
+ s_value +
"\"/>\n");
}
}