![JAR search and dependency download from the Maven repository](/logo.png)
net.sourceforge.plantuml.regex.RegexResult 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.regex;
import java.util.Collections;
import java.util.Map;
public class RegexResult {
private final Map data;
public RegexResult(Map data) {
this.data = Collections.unmodifiableMap(data);
}
@Override
public String toString() {
return data.toString();
}
public RegexPartialMatch get(String key) {
return data.get(key);
}
public String get(String key, int num) {
final RegexPartialMatch reg = data.get(key);
if (reg == null)
return null;
return reg.get(num);
}
public String getLazzy(String key, int num) {
for (Map.Entry ent : data.entrySet()) {
if (ent.getKey().startsWith(key) == false)
continue;
final RegexPartialMatch match = ent.getValue();
if (num >= match.size())
continue;
if (match.get(num) != null)
return ent.getValue().get(num);
}
return null;
}
public int size() {
return data.size();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy