-/**
+/*
* Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-
package org.opendaylight.openflowplugin.applications.frsync.util;
+import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
-import java.util.List;
import java.util.Map;
-import javax.annotation.Nonnull;
-import javax.annotation.Nullable;
+import org.eclipse.jdt.annotation.NonNull;
+import org.eclipse.jdt.annotation.Nullable;
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNode;
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.meters.Meter;
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.Table;
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.Flow;
import org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.groups.Group;
import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.types.rev130918.MeterId;
+import org.opendaylight.yangtools.yang.common.Uint32;
+import org.opendaylight.yangtools.yang.common.Uint8;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
throw new IllegalAccessError("non instantiable util class");
}
- @Nonnull
- public static Map<Short, Table> wrapTablesToMap(@Nullable final List<Table> tables) {
- final Map<Short, Table> tableMap;
+ @NonNull
+ public static Map<Uint8, Table> wrapTablesToMap(@Nullable final Collection<Table> tables) {
+ final Map<Uint8, Table> tableMap;
if (tables == null) {
tableMap = Collections.emptyMap();
return tableMap;
}
- @Nonnull
- public static Map<FlowDescriptor, Flow> wrapFlowsToMap(@Nullable final List<Flow> flows) {
+ @NonNull
+ public static Map<FlowDescriptor, Flow> wrapFlowsToMap(@Nullable final Collection<Flow> flows) {
final Map<FlowDescriptor, Flow> flowMap;
if (flows == null) {
return flowConfigMap.get(new FlowDescriptor(flow));
}
- @Nonnull
- public static Map<MeterId, Meter> wrapMetersToMap(@Nullable final List<Meter> meters) {
+ @NonNull
+ public static Map<MeterId, Meter> wrapMetersToMap(@Nullable final Collection<Meter> meters) {
final Map<MeterId, Meter> meterMap;
if (meters == null) {
return meterMap;
}
- @Nonnull
- public static Map<Long, Group> wrapGroupsToMap(@Nullable final List<Group> groups) {
- final Map<Long, Group> groupMap;
+ @NonNull
+ public static Map<Uint32, Group> wrapGroupsToMap(@Nullable final Collection<Group> groups) {
+ final Map<Uint32, Group> groupMap;
if (groups == null) {
groupMap = Collections.emptyMap();