Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save EliJDonahue/eeaae36fa7f35d459509f0c02b22be70 to your computer and use it in GitHub Desktop.
Save EliJDonahue/eeaae36fa7f35d459509f0c02b22be70 to your computer and use it in GitHub Desktop.
Demonstrates a sub-optimal approach to combining multiple items.
Item configuration = inn.newItem("tmp");
for (int i=0; i<10; i++)
{
Item singleItemConfig = inn.newItem("CAD", "add");
singleItemConfig.setProperty("item_number", "Test " + i);
configuration.appendItem(singleItemConfig);
}
configuration.removeItem(configuration.getItemByIndex(0));
Item res = configuration.apply();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment