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

com.github.jy2.di.internal.GraphName Maven / Gradle / Ivy

There is a newer version: 0.0.39
Show newest version
package com.github.jy2.di.internal;

import java.util.regex.Pattern;

public final class GraphName {

	private static final Pattern VALID_GRAPH_NAME_PATTERN = Pattern.compile("^([\\~\\/A-Za-z][\\w_\\/]*)?$");

	public static void verify(String name) {
		if (!VALID_GRAPH_NAME_PATTERN.matcher(name).matches()) {
			throw new RuntimeException("Invalid ROS graph name: " + name);
		}
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy