net.sourceforge.plantuml.url.CMapData 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.url;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Set;
import net.sourceforge.plantuml.text.BackSlash;
public class CMapData {
// ::remove file when __HAXE__
private final StringBuilder stringBuilder = new StringBuilder();
public String asString(String nameId) {
return "\n";
}
public boolean containsData() {
return stringBuilder.length() > 0;
}
public void appendString(String s) {
stringBuilder.append(s);
}
public void appendLong(long s) {
stringBuilder.append(s);
}
private void appendUrl(int seq, Url url, double scale) {
appendString("");
appendString(BackSlash.NEWLINE);
}
public static CMapData cmapString(Set allUrlEncountered, double scale) {
final CMapData cmapdata = new CMapData();
final List all = new ArrayList<>(allUrlEncountered);
Collections.sort(all, Url.SURFACE_COMPARATOR);
int seq = 1;
for (Url u : all) {
if (u.hasData() == false) {
continue;
}
cmapdata.appendUrl(seq, u, scale);
seq++;
}
return cmapdata;
}
}