c1243bd6e6479cc4df6f0246861f22e30925d828
[yangtools.git] / yang / yang-data-api / src / main / java / org / opendaylight / yangtools / yang / data / api / schema / tree / spi / Version.java
1 /*
2  * Copyright (c) 2014 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.yang.data.api.schema.tree.spi;
9
10 /**
11  * The concept of a version, either node version, or a subtree version. The
12  * only interface contract this class has is that no two versions are the
13  * same.
14  */
15 public final class Version {
16     private Version() {
17
18     }
19
20     /**
21      * Create a new version, distinct from any other version.
22      *
23      * @return a new version.
24      */
25     public Version next() {
26         return new Version();
27     }
28
29     /**
30      * Create an initial version.
31      *
32      * @return a new version.
33      */
34     public static Version initial() {
35         return new Version();
36     }
37 }