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

com.structurizr.model.GroupableElement Maven / Gradle / Ivy

There is a newer version: 2.2.0
Show newest version
package com.structurizr.model;

import com.structurizr.util.StringUtils;

/**
 * Represents an element that can be included in a group.
 */
public abstract class GroupableElement extends Element {

    private String group;

    GroupableElement() {
    }

    /**
     * Gets the name of the group in which this element should be included in.
     *
     * @return the group name, or null if not set
     */
    public String getGroup() {
        return group;
    }

    /**
     * Sets the name of the group in which this element should be included in.
     *
     * @param group the group name
     */
    public void setGroup(String group) {
        if (group == null) {
            this.group = null;
        } else {
            this.group = group.trim();

            if (StringUtils.isNullOrEmpty(this.group)) {
                this.group = null;
            }
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy