2 * Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved.
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
8 package org.opendaylight.yangtools.util;
10 import com.google.common.annotations.Beta;
11 import java.util.UUID;
12 import javax.annotation.Nonnull;
13 import org.opendaylight.yangtools.concepts.Identifier;
16 * Utility {@link Identifier} backed by a {@link UUID}.
18 * @author Robert Varga
21 public abstract class AbstractStringIdentifier<T extends AbstractStringIdentifier<T>>
22 extends AbstractIdentifier<String> implements Comparable<T> {
23 private static final long serialVersionUID = 1L;
25 protected AbstractStringIdentifier(final String string) {
30 @SuppressWarnings("checkstyle:parameterName")
31 public final int compareTo(@Nonnull final T o) {
32 return getValue().compareTo(o.getValue());