Blame |
Last modification |
View Log
| RSS feed
package dongfang.mkt.configuration;
public class ArrayEntry
extends ParameterEntry
{
int length
;
boolean isDynamic
;
int[] values
;
ArrayEntry
(String name,
boolean isDynamic,
int length
) {
super(name
);
this.
isDynamic = isDynamic
;
this.
length = length
;
}
int[] getValue
() {
return values
;
}
int setValue
(int[] data,
int offset
) {
values =
new int[length
];
System.
arraycopy(data, offset, values,
0, length
);
return length
;
}
int getByteCount
() {
return length
;
}
String toStringWithValues
() {
StringBuilder result =
new StringBuilder(name +
":\t{");
for (int i =
0; i
< length
; i++
) {
if (i
!=
0)
result.
append(",");
result.
append(values
[i
]);
}
result.
append("}");
return result.
toString();
}
void toXML
(StringBuilder result
) {
result.
append(" <list name=\"" + name +
"\">\n");
for (int i =
0; i
< length
; i++
) {
result.
append(" <entry value=\"" + values
[i
] +
"\"/>\n");
}
result.
append(" </list>\n");
}
}