Fix most bgp-parser-spi checkstyle violations
[bgpcep.git] / bgp / parser-spi / src / main / java / org / opendaylight / protocol / bgp / parser / spi / pojo / SimpleSubsequentAddressFamilyRegistry.java
1 /*
2  * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
3  *
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
7  */
8 package org.opendaylight.protocol.bgp.parser.spi.pojo;
9
10 import static com.google.common.base.Preconditions.checkArgument;
11
12 import org.opendaylight.protocol.bgp.parser.spi.SubsequentAddressFamilyRegistry;
13 import org.opendaylight.protocol.util.Values;
14 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev180329.SubsequentAddressFamily;
15
16 final class SimpleSubsequentAddressFamilyRegistry extends AbstractFamilyRegistry<SubsequentAddressFamily, Integer>
17         implements SubsequentAddressFamilyRegistry {
18     AutoCloseable registerSubsequentAddressFamily(final Class<? extends SubsequentAddressFamily> clazz,
19             final int number) {
20         checkArgument(number >= 0 && number <= Values.UNSIGNED_BYTE_MAX_VALUE);
21         return super.registerFamily(clazz, number);
22     }
23
24     @Override
25     public Class<? extends SubsequentAddressFamily> classForFamily(final int number) {
26         return super.classForFamily(number);
27     }
28
29     @Override
30     public Integer numberForClass(final Class<? extends SubsequentAddressFamily> clazz) {
31         return super.numberForClass(clazz);
32     }
33 }