Revert "BUG-47 : unfinished PCEP migration to generated DTOs."
[bgpcep.git] / concepts / src / main / java / org / opendaylight / protocol / concepts / IGPMetric.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.concepts;
9
10 /**
11  * Interior Gateway Protocol metric class.
12  */
13 public final class IGPMetric extends AbstractMetric<IGPMetric> {
14         private static final long serialVersionUID = -401875021705133799L;
15
16         /**
17          * Construct a new IGP metric object.
18          *
19          * @param value Metric value
20          * @throws IllegalArgumentException ex when value is outside of allowed
21          *         range (0-16777215)
22          */
23         public IGPMetric(final long value) {
24                 super(value);
25                 if (value < 0 || value > 16777215)
26                         throw new IllegalArgumentException("Invalid IGP metric value");
27         }
28 }
29