Code Review
/
yangtools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Merge "Bug 2361: Added prototype implementation using new SPI."
[yangtools.git]
/
yang
/
yang-data-impl
/
src
/
main
/
java
/
org
/
opendaylight
/
yangtools
/
yang
/
data
/
impl
/
schema
/
builder
/
impl
/
ImmutableUnkeyedListNodeBuilder.java
diff --git
a/yang/yang-data-impl/src/main/java/org/opendaylight/yangtools/yang/data/impl/schema/builder/impl/ImmutableUnkeyedListNodeBuilder.java
b/yang/yang-data-impl/src/main/java/org/opendaylight/yangtools/yang/data/impl/schema/builder/impl/ImmutableUnkeyedListNodeBuilder.java
index 9eab2ba09816bd45d76faca4344d4b06273767f8..eb2d3884bbc4dfda6a0e8f2a4a8e9eb39ae73a81 100644
(file)
--- a/
yang/yang-data-impl/src/main/java/org/opendaylight/yangtools/yang/data/impl/schema/builder/impl/ImmutableUnkeyedListNodeBuilder.java
+++ b/
yang/yang-data-impl/src/main/java/org/opendaylight/yangtools/yang/data/impl/schema/builder/impl/ImmutableUnkeyedListNodeBuilder.java
@@
-9,6
+9,7
@@
package org.opendaylight.yangtools.yang.data.impl.schema.builder.impl;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.Iterables;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.Iterables;
+import java.util.Collection;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
@@
-78,7
+79,7
@@
public class ImmutableUnkeyedListNodeBuilder implements CollectionNodeBuilder<Un
}
@Override
}
@Override
- public CollectionNodeBuilder<UnkeyedListEntryNode, UnkeyedListNode> withValue(final
List
<UnkeyedListEntryNode> value) {
+ public CollectionNodeBuilder<UnkeyedListEntryNode, UnkeyedListNode> withValue(final
Collection
<UnkeyedListEntryNode> value) {
// TODO replace or putAll ?
for (final UnkeyedListEntryNode UnkeyedListEntryNode : value) {
withChild(UnkeyedListEntryNode);
// TODO replace or putAll ?
for (final UnkeyedListEntryNode UnkeyedListEntryNode : value) {
withChild(UnkeyedListEntryNode);
@@
-115,19
+116,19
@@
public class ImmutableUnkeyedListNodeBuilder implements CollectionNodeBuilder<Un
return withoutChild(key);
}
return withoutChild(key);
}
- protected static final class EmptyImmutableUnkeyedListNode extends AbstractImmutableNormalizedNode<YangInstanceIdentifier.NodeIdentifier,
Iterable
<UnkeyedListEntryNode>> implements Immutable, UnkeyedListNode {
+ protected static final class EmptyImmutableUnkeyedListNode extends AbstractImmutableNormalizedNode<YangInstanceIdentifier.NodeIdentifier,
Collection
<UnkeyedListEntryNode>> implements Immutable, UnkeyedListNode {
protected EmptyImmutableUnkeyedListNode(final NodeIdentifier nodeIdentifier) {
super(nodeIdentifier);
}
@Override
protected EmptyImmutableUnkeyedListNode(final NodeIdentifier nodeIdentifier) {
super(nodeIdentifier);
}
@Override
- public
Iterable
<UnkeyedListEntryNode> getValue() {
- return Collections.empty
Lis
t();
+ public
Collection
<UnkeyedListEntryNode> getValue() {
+ return Collections.empty
Se
t();
}
@Override
public UnkeyedListEntryNode getChild(final int position) {
}
@Override
public UnkeyedListEntryNode getChild(final int position) {
-
return null
;
+
throw new IndexOutOfBoundsException()
;
}
@Override
}
@Override
@@
-147,7
+148,7
@@
public class ImmutableUnkeyedListNodeBuilder implements CollectionNodeBuilder<Un
}
protected static final class ImmutableUnkeyedListNode extends
}
protected static final class ImmutableUnkeyedListNode extends
- AbstractImmutableNormalizedValueNode<YangInstanceIdentifier.NodeIdentifier,
Iterable
<UnkeyedListEntryNode>>
+ AbstractImmutableNormalizedValueNode<YangInstanceIdentifier.NodeIdentifier,
Collection
<UnkeyedListEntryNode>>
implements Immutable, UnkeyedListNode {
private final ImmutableList<UnkeyedListEntryNode> children;
implements Immutable, UnkeyedListNode {
private final ImmutableList<UnkeyedListEntryNode> children;