if (values.length != equalities.length) {
throw new IllegalArgumentException("Number of values and equalities must match.");
}
Composite comp = new Composite();
for (int i = 0; i < values.length; i++) {
comp.addComponent(values[i], StringSerializer.get(), equalities[i]);
}
return comp;
}
public static void main(String[] args) throws Exception {