var.setDataType(vars[j].getUPnPDataType());
var.setName(vars[j].getName());
var.setSendEvents(vars[j].sendsEvents());
String[] values = vars[j].getAllowedValues();
if(values!=null){
AllowedValueList avl = new AllowedValueList(values);
var.setAllowedValueList(avl);
}else if(vars[j].getMaximum()!= null){
AllowedValueRange avr = new AllowedValueRange(
vars[j].getMaximum(),
vars[j].getMinimum(),