net.sourceforge.plantuml.cucadiagram.MagmaList 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.cucadiagram;
import java.util.ArrayList;
import java.util.List;
import net.sourceforge.plantuml.abel.Entity;
public class MagmaList {
private final List all = new ArrayList<>();
public void add(Magma magma) {
all.add(magma);
}
public MagmaList getMagmas(Entity group) {
final MagmaList result = new MagmaList();
for (Magma m : all) {
if (m.getContainer() == group) {
result.add(m);
}
}
return result;
}
public int size() {
return all.size();
}
public void putInSquare() {
final SquareLinker linker = new SquareLinker() {
public void topDown(Magma top, Magma down) {
top.linkToDown(down);
}
public void leftRight(Magma left, Magma right) {
left.linkToRight(right);
}
};
new SquareMaker().putInSquare(all, linker);
}
}