net.sourceforge.plantuml.stereo.Stereostyles Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of plantuml-mit Show documentation
Show all versions of plantuml-mit Show documentation
PlantUML is a component that allows to quickly write diagrams from text.
// THIS FILE HAS BEEN GENERATED BY A PREPROCESSOR.
package net.sourceforge.plantuml.stereo;
import java.util.Collection;
import java.util.Collections;
import java.util.LinkedHashSet;
import java.util.Set;
import net.sourceforge.plantuml.regex.Matcher2;
import net.sourceforge.plantuml.regex.MyPattern;
import net.sourceforge.plantuml.regex.Pattern2;
public class Stereostyles {
// ::remove folder when __HAXE__
public static final Stereostyles NONE = new Stereostyles();
private final Set names = new LinkedHashSet<>();
private Stereostyles() {
}
public boolean isEmpty() {
return names.isEmpty();
}
public static Stereostyles build(String label) {
final Stereostyles result = new Stereostyles();
final Pattern2 p = MyPattern.cmpile("\\<{3}(.*?)\\>{3}");
final Matcher2 m = p.matcher(label);
while (m.find()) {
result.names.add(m.group(1));
}
return result;
}
public Collection getStyleNames() {
return Collections.unmodifiableCollection(names);
}
}