From fa7cbc3b640b5892bd20bb117a7d7161e16e859f Mon Sep 17 00:00:00 2001 From: Robert Varga Date: Sat, 22 Aug 2015 11:17:02 +0200 Subject: [PATCH] Make NodeWithValue generic Retaining the type of contained value is useful in various places, which means we don't have to add an explicit cast. Change-Id: Ibf3b16fd7b3348730f3efb3e284a345e69003e30 Signed-off-by: Robert Varga --- .../yang/data/api/YangInstanceIdentifier.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/yang/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/YangInstanceIdentifier.java b/yang/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/YangInstanceIdentifier.java index 9944d741e6..06760528ea 100644 --- a/yang/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/YangInstanceIdentifier.java +++ b/yang/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/YangInstanceIdentifier.java @@ -575,17 +575,17 @@ public abstract class YangInstanceIdentifier implements Path extends AbstractPathArgument { private static final long serialVersionUID = -3637456085341738431L; - private final Object value; + private final T value; - public NodeWithValue(final QName node, final Object value) { + public NodeWithValue(final QName node, final T value) { super(node); this.value = value; } - public Object getValue() { + public T getValue() { return value; } @@ -593,7 +593,7 @@ public abstract class YangInstanceIdentifier implements Path other = (NodeWithValue) obj; return Objects.deepEquals(value, other.value); } -- 2.36.6