import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;
import java.util.Collection;
-import java.util.HashSet;
+import java.util.LinkedHashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Objects;
import java.util.Set;
+import javax.annotation.Nonnull;
import org.opendaylight.yangtools.yang.common.QName;
import org.opendaylight.yangtools.yang.model.api.AugmentationSchema;
import org.opendaylight.yangtools.yang.model.api.NotificationDefinition;
// initSubstatementCollections
Collection<? extends EffectiveStatement<?, ?>> effectiveSubstatements = effectiveSubstatements();
List<UnknownSchemaNode> unknownNodesInit = new LinkedList<>();
- Set<AugmentationSchema> augmentationsInit = new HashSet<>();
+ Set<AugmentationSchema> augmentationsInit = new LinkedHashSet<>();
for (EffectiveStatement<?, ?> effectiveStatement : effectiveSubstatements) {
if (effectiveStatement instanceof UnknownSchemaNode) {
UnknownSchemaNode unknownNode = (UnknownSchemaNode) effectiveStatement;
this.augmentations = ImmutableSet.copyOf(augmentationsInit);
}
+ @Nonnull
@Override
public QName getQName() {
return qname;
}
+ @Nonnull
@Override
public SchemaPath getPath() {
return path;
return augmentations;
}
+ @Nonnull
@Override
public List<UnknownSchemaNode> getUnknownSchemaNodes() {
return unknownNodes;
@Override
public String toString() {
- StringBuilder sb = new StringBuilder(NotificationEffectiveStatementImpl.class.getSimpleName());
- sb.append("[qname=").append(qname).append(", path=").append(path).append("]");
- return sb.toString();
+ return NotificationEffectiveStatementImpl.class.getSimpleName() + "[qname=" + qname + ", path=" + path + "]";
}
}