net.sourceforge.plantuml.stats.StatsTableImpl 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.stats;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.EnumSet;
import java.util.List;
import net.sourceforge.plantuml.stats.api.StatsColumn;
import net.sourceforge.plantuml.stats.api.StatsLine;
import net.sourceforge.plantuml.stats.api.StatsTable;
public class StatsTableImpl implements StatsTable {
private final String name;
private final Collection columnHeaders;
private final List lines = new ArrayList<>();
public StatsTableImpl(String name) {
this.name = name;
this.columnHeaders = EnumSet.noneOf(StatsColumn.class);
}
public String getName() {
return name;
}
public Collection getColumnHeaders() {
return Collections.unmodifiableCollection(columnHeaders);
}
public List getLines() {
return Collections.unmodifiableList(lines);
}
public void addLine(StatsLine line) {
this.columnHeaders.addAll(line.getColumnHeaders());
lines.add(line);
}
}