package org.opendaylight.yangtools.yang.data.impl.codec;
import java.util.Map.Entry;
-
import org.opendaylight.yangtools.yang.common.QName;
public class ValueWithQName<V> implements Entry<QName, V>{
return qname;
}
+ @Override
public V getValue() {
return value;
}
@SuppressWarnings("rawtypes")
ValueWithQName other = (ValueWithQName) obj;
if (qname == null) {
- if (other.qname != null)
+ if (other.qname != null) {
return false;
- } else if (!qname.equals(other.qname))
+ }
+ } else if (!qname.equals(other.qname)) {
return false;
+ }
if (value == null) {
if (other.value != null) {
return false;
detectedCase = detectedCaseForChild.get();
}
- if (detectedCase == null)
+ if (detectedCase == null) {
return childrenToProcess;
+ }
// Filter out child nodes that do not belong to detected case =
// Nodes from other cases present in actual
}
private Optional<LeafSetNode<?>> build(LeafListSchemaNode schemaNode, List<LeafSetEntryNode<?>> resultNodes) {
- if(resultNodes.isEmpty())
+ if(resultNodes.isEmpty()) {
return Optional.absent();
+ }
ListNodeBuilder<Object, LeafSetEntryNode<Object>> b = Builders.leafSetBuilder(schemaNode);
for (LeafSetEntryNode<?> resultNode : resultNodes) {
Optional<MapNode> modification, OperationStack operationStack) throws DataModificationException {
// Merge or None operation on parent, leaving actual if modification not present
- if (!modification.isPresent())
+ if (!modification.isPresent()) {
return actual;
+ }
Map<YangInstanceIdentifier.NodeIdentifierWithPredicates, MapEntryNode> resultNodes = Maps.newLinkedHashMap();
- if(actual.isPresent())
+ if(actual.isPresent()) {
resultNodes.putAll(mapEntries(actual.get()));
+ }
// TODO implement ordering for modification nodes
}
private Optional<MapNode> build(ListSchemaNode schema, Map<YangInstanceIdentifier.NodeIdentifierWithPredicates, MapEntryNode> resultNodes) {
- if(resultNodes.isEmpty())
+ if(resultNodes.isEmpty()) {
return Optional.absent();
+ }
CollectionNodeBuilder<MapEntryNode, MapNode> b = Builders.mapBuilder(schema);