return delegate.getInput();
case "output":
return delegate.getOutput();
+ default:
+ return null;
}
- return null;
}
@Override
@Override
public Collection<DataSchemaNode> getChildNodes() {
- final ArrayList<DataSchemaNode> ret = new ArrayList<>();
+ final List<DataSchemaNode> ret = new ArrayList<>();
final ContainerSchemaNode input = getInput();
final ContainerSchemaNode output = getOutput();
if(input != null) {
import com.google.common.base.MoreObjects.ToStringHelper;
+// FIXME: are attributes part of hashCode/equals?
public abstract class AbstractImmutableDataContainerAttrNode<K extends YangInstanceIdentifier.PathArgument>
extends AbstractImmutableDataContainerNode<K>
implements AttributesContainer {
return super.addToStringAttributes(toStringHelper).add("attributes", attributes);
}
-// FIXME: are attributes part of hashCode/equals?
-// @Override
-// protected int valueHashCode() {
-// int result = super.valueHashCode();
-// for (final Entry<?, ?> a : attributes.entrySet()) {
-// result = 31 * result + a.hashCode();
-// }
-// return result;
-// }
-
- // FIXME: are attributes part of hashCode/equals?
-// @Override
-// protected boolean valueEquals(final NormalizedNode<?, ?> other) {
-// if (!super.valueEquals(other)) {
-// return false;
-// }
-// final Set<Entry<QName, String>> tas = getAttributes().entrySet();
-// final Set<Entry<QName, String>> oas = container.getAttributes().entrySet();
-//
-// return tas.containsAll(oas) && oas.containsAll(tas);
-// return true;
-// }
}
@Override
protected int valueHashCode() {
final int result = getValue() != null ? getValue().hashCode() : 1;
-// FIXME: are attributes part of hashCode/equals?
-// for (final Entry<?, ?> a : attributes.entrySet()) {
-// result = 31 * result + a.hashCode();
-// }
+ // FIXME: are attributes part of hashCode/equals?
return result;
}
}
// FIXME: are attributes part of hashCode/equals?
- // final Set<Entry<QName, String>> tas = getAttributes().entrySet();
- // final Set<Entry<QName, String>> oas =
- // container.getAttributes().entrySet();
- //
- // return tas.containsAll(oas) && oas.containsAll(tas);
return true;
}
switch (sourceProgress) {
case FINISHED:
currentSource.remove();
+ // Fallback to progress, since we were able to make progress in computation
case PROGRESS:
progressing = true;
+ break;
case NO_PROGRESS:
- // Noop;
+ // Noop
+ break;
+ default:
+ throw new IllegalStateException("Unsupported phase progress " + sourceProgress);
}
}
}
private final A argument;
SubstatementContext(StatementContextBase<?,?,?> parent,ContextBuilder<A,D,E> builder) throws SourceException {
- //super(builder, builder.getDefinition().parseArgumentValue(parent, builder.getRawArgument()));
super(builder);
this.parent = Preconditions.checkNotNull(parent, "Parent must not be null");
this.argument = builder.getDefinition().parseArgumentValue(this, builder.getRawArgument());