001/*
002 * Copyright (c) 2023 Chris K Wensel <[email protected]>. All Rights Reserved.
003 *
004 * This Source Code Form is subject to the terms of the Mozilla Public
005 * License, v. 2.0. If a copy of the MPL was not distributed with this
006 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
007 */
008
009package clusterless.commons.naming;
010
011import java.util.Objects;
012
013/**
014 * Version is a {@link Fixed} value that represents a version.
015 */
016public class Version extends Fixed {
017    private static final Version NULL_VERSION = new Version(null);
018
019    public static Version of(String version) {
020        Objects.requireNonNull(version, "version may not be null");
021        return new Version(version);
022    }
023
024    public static Version versionNull() {
025        return NULL_VERSION;
026    }
027
028    protected Version(String value) {
029        super(value);
030    }
031
032}