use of org.diirt.vtype.VStringArray in project yamcs-studio by yamcs.
the class ChannelsFormulaFunction method calculate.
@Override
public Object calculate(final List<Object> args) {
// Retrieve the new names
VStringArray value = (VStringArray) args.get(0);
List<String> newNames = null;
if (value != null) {
newNames = value.getData();
}
return calculateImpl(newNames);
}
use of org.diirt.vtype.VStringArray in project yamcs-studio by yamcs.
the class ConcatStringArrayFunction method calculate.
@Override
public Object calculate(List<Object> args) {
VStringArray stringArray = (VStringArray) args.get(0);
if (stringArray == null) {
return null;
}
StringBuffer sb = new StringBuffer();
for (String str : stringArray.getData()) {
sb.append(str);
}
return ValueFactory.newVString(sb.toString(), stringArray, stringArray);
}
use of org.diirt.vtype.VStringArray in project yamcs-studio by yamcs.
the class TableUnionFunction method calculate.
@Override
public Object calculate(final List<Object> args) {
VString columnName = (VString) args.get(0);
VStringArray columnValues = (VStringArray) args.get(1);
List<VTable> tables = new ArrayList<>();
for (int i = 2; i < args.size(); i++) {
Object object = args.get(i);
tables.add((VTable) object);
}
return VTableFactory.union(columnName, columnValues, tables.toArray(new VTable[tables.size()]));
}
Aggregations