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

net.serenitybdd.plugins.jira.model.CascadingSelectOption Maven / Gradle / Ivy

The newest version!
package net.serenitybdd.plugins.jira.model;

import com.google.common.collect.ImmutableList;

import java.util.List;
import java.util.Optional;

public class CascadingSelectOption {
    private final String option;
    private final Optional parentOption;
    private List nestedOptions;

    private final static List NO_CHILDREN = ImmutableList.of();

    public CascadingSelectOption(String option, CascadingSelectOption parentOption) {
        this(option, parentOption, NO_CHILDREN);
    }

    public CascadingSelectOption(String option, CascadingSelectOption parentOption, List nestedOptions) {
        this.option = option;
        this.parentOption = Optional.ofNullable(parentOption);
        this.nestedOptions = nestedOptions;
    }

    public String getOption() {
        return option;
    }

    public Optional getParentOption() {
        return parentOption;
    }

    public List getNestedOptions() {
        return ImmutableList.copyOf(nestedOptions);
    }

    public void addChildren(List nestedOptions) {
        this.nestedOptions = ImmutableList.copyOf(nestedOptions);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy