Search in sources :

Example 1 with InnerListBuilder

use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.dsbenchmark.rev150105.test.exec.outer.list.InnerListBuilder in project controller by opendaylight.

the class BaListBuilder method buildInnerList.

private static List<InnerList> buildInnerList(final int index, final int elements) {
    List<InnerList> innerList = new ArrayList<>(elements);
    final String itemStr = "Item-" + String.valueOf(index) + "-";
    for (int i = 0; i < elements; i++) {
        innerList.add(new InnerListBuilder().setKey(new InnerListKey(i)).setName(i).setValue(itemStr + String.valueOf(i)).build());
    }
    return innerList;
}
Also used : InnerList(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.dsbenchmark.rev150105.test.exec.outer.list.InnerList) InnerListBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.dsbenchmark.rev150105.test.exec.outer.list.InnerListBuilder) ArrayList(java.util.ArrayList) InnerListKey(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.dsbenchmark.rev150105.test.exec.outer.list.InnerListKey)

Aggregations

ArrayList (java.util.ArrayList)1 InnerList (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.dsbenchmark.rev150105.test.exec.outer.list.InnerList)1 InnerListBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.dsbenchmark.rev150105.test.exec.outer.list.InnerListBuilder)1 InnerListKey (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.dsbenchmark.rev150105.test.exec.outer.list.InnerListKey)1