import org.opendaylight.yangtools.yang.binding.DataObject;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
-/**
- *
- */
public class DefaultInstanceReference<T extends DataObject> implements InstanceReference<T> {
private final InstanceIdentifier<T> instanceIdentifier;
super();
}
- public static KeyMapping getKeyMapping(@Nonnull final InetAddress inetAddress, @Nullable final String password){
+ public static KeyMapping getKeyMapping(@Nonnull final InetAddress inetAddress, @Nullable final String password) {
final KeyMapping keyMapping = new KeyMapping();
if (!isNullOrEmpty(password)) {
keyMapping.put(inetAddress, password.getBytes(StandardCharsets.US_ASCII));
return keyMapping;
}
- public static KeyMapping getKeyMapping(){
+ public static KeyMapping getKeyMapping() {
return new KeyMapping();
}
}
import com.google.common.collect.ArrayListMultimap;
import com.google.common.collect.Iterables;
import com.google.common.collect.ListMultimap;
-
import java.util.List;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
-
import javax.annotation.concurrent.GuardedBy;
import javax.annotation.concurrent.ThreadSafe;
-
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* A registry which allows multiple values for a particular key. One of those is considered the best and returned as the
* representative.
- *
* When selecting the candidate, we evaluate the order of insertion, picking the value inserted first, but then we look
* at all the other candidates and if there is one which is a subclass of the first one, we select that one.
*
import java.util.HashSet;
import java.util.Set;
-
import org.junit.Before;
import org.junit.Test;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.AsNumber;
public class ASNumberTest {
- private AsNumber asn1, asn3, asn4;
+ private AsNumber asn1;
+ private AsNumber asn3;
+ private AsNumber asn4;
@Before
public void setUp() {
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.network.concepts.rev131125.Bandwidth;
public class BandwidthTest {
- private Bandwidth b1, b2, b3, b4;
+ private Bandwidth b1;
+ private Bandwidth b2;
+ private Bandwidth b3;
+ private Bandwidth b4;
@Before
public void setUp() {
public class DefaultInstanceReferenceTest {
- private static final InstanceIdentifier<NetworkTopology> IID = InstanceIdentifier.builder(NetworkTopology.class).build();
+ private static final InstanceIdentifier<NetworkTopology> IID
+ = InstanceIdentifier.builder(NetworkTopology.class).build();
@Test
public void testDefaultInstanceReference() {
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
+
import org.junit.Test;
public class MultiRegistryTest {