Fix eclipse/checkstyle warnings
[yangtools.git] / common / util / src / main / java / org / opendaylight / yangtools / util / AbstractStringIdentifier.java
1 /*
2  * Copyright (c) 2016 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.yangtools.util;
9
10 import com.google.common.annotations.Beta;
11 import java.util.UUID;
12 import javax.annotation.Nonnull;
13 import org.opendaylight.yangtools.concepts.Identifier;
14
15 /**
16  * Utility {@link Identifier} backed by a {@link UUID}.
17  *
18  * @author Robert Varga
19  */
20 @Beta
21 public abstract class AbstractStringIdentifier<T extends AbstractStringIdentifier<T>>
22         extends AbstractIdentifier<String> implements Comparable<T> {
23     private static final long serialVersionUID = 1L;
24
25     protected AbstractStringIdentifier(final String string) {
26         super(string);
27     }
28
29     @Override
30     @SuppressWarnings("checkstyle:parameterName")
31     public final int compareTo(@Nonnull final T o) {
32         return getValue().compareTo(o.getValue());
33     }
34 }