All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ru.curs.celesta.score.Namespace Maven / Gradle / Ivy

The newest version!
package ru.curs.celesta.score;

/**
 * Grain name space.
 * 

* A name space is defined as a set of sets of at least one lower case letter or digit separated by dots, f.e. * name.space.1 *

* * Since a grain may consist of several grain parts the name space concept deems it to be applied * to grain parts rather than to grains. * * * @author Pavel Perminov ([email protected]) * @since 2019-03-09 */ public final class Namespace { /** * Default namespace instance. */ public static final Namespace DEFAULT = new Namespace(); private final String value; private Namespace() { value = ""; } public Namespace(String value) { if (!value.matches("[a-z0-9]+(\\.[a-z0-9]+)*")) { throw new IllegalArgumentException("Incorrect name space format encountered: " + value); } this.value = value; } public String getValue() { return value; } @Override public String toString() { return value; } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy