/* * Copyright (c) 2016 Red Hat, Inc. and others. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html */ package org.opendaylight.mdsal.binding.testutils; import java.util.Collections; import org.eclipse.xtext.xbase.lib.CollectionLiterals; import org.eclipse.xtext.xbase.lib.Procedures.Procedure1; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.mdsal.test.augment.rev140709.TreeComplexUsesAugment; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.mdsal.test.augment.rev140709.TreeComplexUsesAugmentBuilder; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.mdsal.test.augment.rev140709.complex.from.grouping.ContainerWithUses; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.mdsal.test.augment.rev140709.complex.from.grouping.ContainerWithUsesBuilder; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.mdsal.test.binding.rev140701.Top; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.mdsal.test.binding.rev140701.TopBuilder; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.mdsal.test.binding.rev140701.two.level.list.TopLevelList; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.mdsal.test.binding.rev140701.two.level.list.TopLevelListBuilder; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.mdsal.test.binding.rev140701.two.level.list.TopLevelListKey; /** * The object initialization code in this class was generated by AssertDataObjects. * * @see AssertDataObjects * @see AssertDataObjectsTest */ public class ExpectedObjects { public static TopLevelList topLevelList() { TopLevelListBuilder it = new TopLevelListBuilder(); TopLevelListKey topLevelListKey = new TopLevelListKey("foo"); it.setKey(topLevelListKey); it.setName("foo"); TreeComplexUsesAugmentBuilder treeComplexUsesAugmentBuilder = new TreeComplexUsesAugmentBuilder(); ContainerWithUsesBuilder containerWithUsesBuilder = new ContainerWithUsesBuilder(); containerWithUsesBuilder.setLeafFromGrouping("foo"); ContainerWithUses containerWithUses = containerWithUsesBuilder.build(); treeComplexUsesAugmentBuilder.setContainerWithUses(containerWithUses); TreeComplexUsesAugment treeComplexUsesAugment = treeComplexUsesAugmentBuilder.build(); it.addAugmentation(TreeComplexUsesAugment.class, treeComplexUsesAugment); return it.build(); } public static Top top() { TopBuilder topBuilder = new TopBuilder(); final Procedure1 _function = (TopBuilder it) -> { TopLevelListBuilder topLevelListBuilder = new TopLevelListBuilder(); final Procedure1 _function_1 = (TopLevelListBuilder it1) -> { it1.setName("foo"); TreeComplexUsesAugmentBuilder treeComplexUsesAugmentBuilder = new TreeComplexUsesAugmentBuilder(); final Procedure1 _function_2 = (TreeComplexUsesAugmentBuilder it2) -> { ContainerWithUsesBuilder containerWithUsesBuilder = new ContainerWithUsesBuilder(); final Procedure1 _function_3 = (ContainerWithUsesBuilder it3) -> { it3.setLeafFromGrouping("foo"); }; ContainerWithUses doubleGreaterThan = XtendBuilderExtensions .operator_doubleGreaterThan( containerWithUsesBuilder, _function_3); it2.setContainerWithUses(doubleGreaterThan); }; TreeComplexUsesAugment doubleGreaterThan = XtendBuilderExtensions .operator_doubleGreaterThan( treeComplexUsesAugmentBuilder, _function_2); it1.addAugmentation(TreeComplexUsesAugment.class, doubleGreaterThan); }; TopLevelList doubleGreaterThan = XtendBuilderExtensions .operator_doubleGreaterThan(topLevelListBuilder, _function_1); it.setTopLevelList(Collections .unmodifiableList(CollectionLiterals.newArrayList(doubleGreaterThan))); }; return XtendBuilderExtensions.operator_doubleGreaterThan(topBuilder, _function); } }