use of org.opendaylight.yangtools.yang.data.api.schema.LeafSetNode in project bgpcep by opendaylight.
the class BestPathStateImpl method extractAsList.
private static List<AsNumber> extractAsList(final UnkeyedListEntryNode segment, final NodeIdentifier nid) {
final List<AsNumber> ases = new ArrayList<>();
final Optional<NormalizedNode> maybeAsList = NormalizedNodes.findNode(segment, nid);
if (maybeAsList.isPresent()) {
final LeafSetNode<?> list = (LeafSetNode<?>) maybeAsList.get();
for (final LeafSetEntryNode<?> as : list.body()) {
ases.add(new AsNumber((Uint32) as.body()));
}
return ases;
}
return null;
}
Aggregations