All Downloads are FREE. Search and download functionalities are using the official Maven repository.

NpsSDK.SimpleElementArray Maven / Gradle / Ivy

There is a newer version: 1.1.0
Show newest version
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", 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);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy