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

net.sourceforge.plantuml.mda.MDAPackageImpl 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.mda;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;

import net.sourceforge.plantuml.abel.Entity;
import net.sourceforge.plantuml.api.mda.option2.MDAEntity;
import net.sourceforge.plantuml.api.mda.option2.MDAPackage;

public class MDAPackageImpl implements MDAPackage {

	private final Collection entities = new ArrayList<>();
	private final Entity group;

	public MDAPackageImpl(Entity group) {
		this.group = group;
		for (Entity leaf : group.leafs()) {
			entities.add(new MDAEntityImpl(leaf));
		}
	}

	public Collection getEntities() {
		return Collections.unmodifiableCollection(entities);
	}

	public String getName() {
		if (group.isRoot()) {
			return "";
		}
		return group.getName();
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy