NpsSDK.SimpleElementArray Maven / Gradle / Ivy
package NpsSDK;
import java.util.ArrayList;
import java.util.List;
public class SimpleElementArray extends BaseElement{
private List values;
@Override
public String serialize() {
return String.format("<%1$s>%2$s%1$s>", this.getName(), joinList(",", this.values));
}
@Override
String getConcatenatedValues() {
return joinList(",", this.values);
}
private String joinList(String delimiter, List stringList){
StringBuilder result = new StringBuilder();
for(int i = 0; i emptyChildren = new ArrayList();
@Override
List getChildren() {
return emptyChildren;
}
/*public SimpleElementArray(String name) {
super(name);
}*/
public void add(String value) { values.add(value); }
public String getValue(int index){
return values.get(index);
}
}