public SubjectsBuilder setOrder(final java.lang.Short value) { if (value != null) { checkOrderRange(value); } this._order = value; return this; }
public SubjectsBuilder addAugmentation(java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.intent.rev150122.intent.Subjects>> augmentationType, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.intent.rev150122.intent.Subjects> augmentation) { if (augmentation == null) { return removeAugmentation(augmentationType); } if (!(this.augmentation instanceof HashMap)) { this.augmentation = new HashMap<>(); } this.augmentation.put(augmentationType, augmentation); return this; }
protected List<Subjects> createSubjects() { List<Subjects> subjectList = new ArrayList<Subjects>(); EndPointGroup endpointGroupFrom = new EndPointGroupBuilder().setName(this.from).build(); org.opendaylight.yang.gen.v1.urn.opendaylight.intent.rev150122.intent.subjects.subject.EndPointGroup fromEPG = new org.opendaylight.yang.gen.v1.urn.opendaylight.intent.rev150122.intent.subjects.subject .EndPointGroupBuilder().setEndPointGroup(endpointGroupFrom).build(); Subjects subjects1 = new SubjectsBuilder().setOrder((short) FIRST_SUBJECT).setSubject(fromEPG).build(); EndPointGroup endpointGroupTo = new EndPointGroupBuilder().setName(this.to).build(); org.opendaylight.yang.gen.v1.urn.opendaylight.intent.rev150122.intent.subjects.subject.EndPointGroup toEPG = new org.opendaylight.yang.gen.v1.urn.opendaylight.intent.rev150122.intent.subjects.subject .EndPointGroupBuilder().setEndPointGroup(endpointGroupTo).build(); Subjects subjects2 = new SubjectsBuilder().setOrder((short) SECOND_SUBJECT).setSubject(toEPG).build(); subjectList.add(subjects1); subjectList.add(subjects2); return subjectList; } }
private SubjectsImpl(SubjectsBuilder base) { if (base.getKey() == null) { this._key = new SubjectsKey( base.getOrder() ); this._order = base.getOrder(); } else { this._key = base.getKey(); this._order = _key.getOrder(); } this._subject = base.getSubject(); switch (base.augmentation.size()) { case 0: this.augmentation = Collections.emptyMap(); break; case 1: final Map.Entry<java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.intent.rev150122.intent.Subjects>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.intent.rev150122.intent.Subjects>> e = base.augmentation.entrySet().iterator().next(); this.augmentation = Collections.<java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.intent.rev150122.intent.Subjects>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.intent.rev150122.intent.Subjects>>singletonMap(e.getKey(), e.getValue()); break; default : this.augmentation = new HashMap<>(base.augmentation); } }
private Subjects subject(short order, String name) { return new SubjectsBuilder() .setSubject( new org.opendaylight.yang.gen.v1.urn.opendaylight.intent.rev150122.intent.subjects.subject.EndPointGroupBuilder() .setEndPointGroup( new org.opendaylight.yang.gen.v1.urn.opendaylight.intent.rev150122.intent.subjects.subject.end.point.group.EndPointGroupBuilder() .setName(name).build()).build()).setOrder(order).build(); }
private SubjectsImpl(SubjectsBuilder base) { if (base.getKey() == null) { this._key = new SubjectsKey( base.getOrder() ); this._order = base.getOrder(); } else { this._key = base.getKey(); this._order = _key.getOrder(); } this._subject = base.getSubject(); switch (base.augmentation.size()) { case 0: this.augmentation = Collections.emptyMap(); break; case 1: final Map.Entry<java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.intent.rev150122.intent.Subjects>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.intent.rev150122.intent.Subjects>> e = base.augmentation.entrySet().iterator().next(); this.augmentation = Collections.<java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.intent.rev150122.intent.Subjects>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.intent.rev150122.intent.Subjects>>singletonMap(e.getKey(), e.getValue()); break; default : this.augmentation = new HashMap<>(base.augmentation); } }
public SubjectsBuilder setOrder(java.lang.Short value) { if (value != null) { checkOrderRange(value); } this._order = value; return this; } /**
public SubjectsBuilder addAugmentation(java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.intent.rev150122.intent.Subjects>> augmentationType, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.intent.rev150122.intent.Subjects> augmentation) { if (augmentation == null) { return removeAugmentation(augmentationType); } if (!(this.augmentation instanceof HashMap)) { this.augmentation = new HashMap<>(); } this.augmentation.put(augmentationType, augmentation); return this; }