2 * Copyright (c) 2015 Yale University and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
9 package org.opendaylight.alto.commons.types.converter;
11 import java.util.LinkedList;
12 import java.util.List;
15 import org.opendaylight.alto.commons.helper.Converter;
16 import org.opendaylight.alto.commons.types.model150404.ModelDstCosts;
18 public class RFC2ModelCostMapDataConverter
19 extends Converter<Map<String, Object>, List<ModelDstCosts>> {
21 public RFC2ModelCostMapDataConverter() {
24 public RFC2ModelCostMapDataConverter(Map<String, Object> _in) {
29 protected Object _convert() {
30 List<ModelDstCosts> dstCostsList = new LinkedList<ModelDstCosts>();
31 for (String dst : in().keySet()) {
32 //TODO: Should support different implementations
33 ModelDstCosts dstCosts = new ModelDstCosts();
35 dstCosts.costDefault = in().get(dst).toString();
36 dstCostsList.add(dstCosts);