X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=data%2Fyang-data-tree-ri%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fyangtools%2Fyang%2Fdata%2Ftree%2Fleafref%2FLeafRefContextBuilder.java;h=0ef444f95fac5027acfc45748d3a532d38d3014b;hb=f1885ed594eaeae46c30e7da7197d1c4df80a97d;hp=06aada4fc2e55614aeb59b583770986752b2f50a;hpb=7cfa38d3d3004105f7c8c5b04ceeebec5c2b6b67;p=yangtools.git diff --git a/data/yang-data-tree-ri/src/main/java/org/opendaylight/yangtools/yang/data/tree/leafref/LeafRefContextBuilder.java b/data/yang-data-tree-ri/src/main/java/org/opendaylight/yangtools/yang/data/tree/leafref/LeafRefContextBuilder.java index 06aada4fc2..0ef444f95f 100644 --- a/data/yang-data-tree-ri/src/main/java/org/opendaylight/yangtools/yang/data/tree/leafref/LeafRefContextBuilder.java +++ b/data/yang-data-tree-ri/src/main/java/org/opendaylight/yangtools/yang/data/tree/leafref/LeafRefContextBuilder.java @@ -12,15 +12,15 @@ import static java.util.Objects.requireNonNull; import java.util.HashMap; import java.util.Iterator; import java.util.Map; -import org.opendaylight.yangtools.concepts.Builder; +import org.eclipse.jdt.annotation.NonNull; +import org.opendaylight.yangtools.concepts.Mutable; import org.opendaylight.yangtools.yang.common.QName; import org.opendaylight.yangtools.yang.common.QNameModule; import org.opendaylight.yangtools.yang.model.api.EffectiveModelContext; import org.opendaylight.yangtools.yang.model.api.Module; import org.opendaylight.yangtools.yang.model.api.SchemaPath; -final class LeafRefContextBuilder implements Builder { - +final class LeafRefContextBuilder implements Mutable { private final Map referencingChildren = new HashMap<>(); private final Map referencedByChildren = new HashMap<>(); private final Map referencedByLeafRefCtx = new HashMap<>(); @@ -43,8 +43,7 @@ final class LeafRefContextBuilder implements Builder { this.schemaContext = requireNonNull(schemaContext); } - @Override - public LeafRefContext build() { + @NonNull LeafRefContext build() { final LeafRefContext leafRefContext = new LeafRefContext(this); // LeafRefContext has made a copy of these @@ -60,7 +59,7 @@ final class LeafRefContextBuilder implements Builder { } void setReferencedBy(final boolean referencedBy) { - this.isReferencedBy = referencedBy; + isReferencedBy = referencedBy; } boolean isReferencing() { @@ -68,7 +67,7 @@ final class LeafRefContextBuilder implements Builder { } void setReferencing(final boolean referencing) { - this.isReferencing = referencing; + isReferencing = referencing; } void addReferencingChild(final LeafRefContext child, final QName childQName) { @@ -96,7 +95,7 @@ final class LeafRefContextBuilder implements Builder { } void setLeafRefTargetPath(final LeafRefPath leafRefPath) { - this.leafRefTargetPath = requireNonNull(leafRefPath); + leafRefTargetPath = requireNonNull(leafRefPath); } String getLeafRefTargetPathString() { @@ -104,7 +103,7 @@ final class LeafRefContextBuilder implements Builder { } void setLeafRefTargetPathString(final String leafRefPathString) { - this.leafRefTargetPathString = requireNonNull(leafRefPathString); + leafRefTargetPathString = requireNonNull(leafRefPathString); } QName getCurrentNodeQName() {