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

tw.yukina.notion.sdk.model.helper.SelectOptionHelper Maven / Gradle / Ivy

There is a newer version: 1.0.1
Show newest version
package tw.yukina.notion.sdk.model.helper;

import tw.yukina.notion.sdk.model.OptionColor;
import tw.yukina.notion.sdk.model.common.SelectOption;

import java.util.ArrayList;
import java.util.List;

public final class SelectOptionHelper {

    public static List getSelectOptions(String[] options){
        List selectOptions = new ArrayList<>();

        for(String str: options){
            SelectOption selectOption = new SelectOption();
            selectOption.setName(str);
            selectOption.setColor(OptionColor.randomColor());
            selectOptions.add(selectOption);
        }

        return selectOptions;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy