net.sourceforge.plantuml.command.MultilinesStrategy 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.command;
import java.util.Iterator;
import java.util.List;
import net.sourceforge.plantuml.text.StringLocated;
public enum MultilinesStrategy {
REMOVE_STARTING_QUOTE, KEEP_STARTING_QUOTE;
public void cleanList(List lines) {
if (this == REMOVE_STARTING_QUOTE)
filterQuote(lines);
}
private void filterQuote(List lines) {
for (final Iterator it = lines.iterator(); it.hasNext();) {
final StringLocated s = it.next();
if (hasStartingQuote(s))
it.remove();
}
}
private boolean hasStartingQuote(StringLocated s) {
return s.getTrimmed().getString().startsWith("\'");
}
}