2 * Copyright (c) 2014 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.yang.data.tree.impl.node;
10 import org.opendaylight.yangtools.concepts.Immutable;
13 * The concept of a version, either node version, or a subtree version. The only interface contract this class has is
14 * that no two {@link Version} are the same.
17 * This class relies on Java Virtual machine's guarantee that the identity of an Object is distinct from any other
18 * Object in the Java heap.
21 * From data management perspective, this concept serves as JVM-level MVCC
22 * <a href="https://en.wikipedia.org/wiki/Multiversion_concurrency_control#Implementation">timestamp (TS)</a>.
24 public final class Version implements Immutable {
30 * Create a new version, distinct from any other version.
32 * @return a new version.
34 @SuppressWarnings("static-method")
35 public Version next() {
40 * Create an initial version.
42 * @return a new version.
44 public static Version initial() {