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

net.sourceforge.plantuml.command.MultilinesStrategy Maven / Gradle / Ivy

There is a newer version: 1.2024.8
Show newest version
// 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("\'");
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy