public class Option extends Object
Metods require you to provide data along with your calls to them. This class represents
these options.
| Modifier and Type | Class and Description |
|---|---|
static class |
Option.Builder
A builder pattern class to buildRequest easier a Option.
|
| Constructor and Description |
|---|
Option(String key,
List<String> dependencies,
String description,
OptionType optionType,
boolean required,
boolean partnerRequired)
Constructor to create an option with dependencies.
|
Option(String key,
String description,
OptionType optionType,
boolean required,
boolean partnerRequired)
Constructor to create an option without dependencies.
|
| Modifier and Type | Method and Description |
|---|---|
static Option.Builder |
create()
Creates a new instance of
Option.Builder. |
List<String> |
getDependencies()
A list of keys describing dependencies between options.
|
Optional<String> |
getDescription()
The description of the option.
|
String |
getKey()
The key of the option.
|
OptionType |
getOptionType()
The type of the option.
|
boolean |
isPartnerRequired()
If the option is required if it is in the
SteamHost.PARTNER mode. |
boolean |
isRequired()
If the option is required or not.
|
public Option(String key, List<String> dependencies, String description, OptionType optionType, boolean required, boolean partnerRequired)
Constructor to create an option with dependencies.
key - The unique key of the option.dependencies - The keys of the options this option is depending on.description - The description of the option, can be null.optionType - The type of the option.required - If the option is required or not.partnerRequired - If the option is required if the SteamHost.PARTNER is used.public Option(String key, String description, OptionType optionType, boolean required, boolean partnerRequired)
Constructor to create an option without dependencies.
key - The unique key of the option.description - The description of the option, can be null.optionType - The type of the option.required - If the option is required or not.partnerRequired - If the option is required if the SteamHost.PARTNER is used.public String getKey()
The key of the option.
public List<String> getDependencies()
A list of keys describing dependencies between options.
public Optional<String> getDescription()
The description of the option.
Optional.empty().public OptionType getOptionType()
The type of the option.
public boolean isRequired()
If the option is required or not.
public boolean isPartnerRequired()
If the option is required if it is in the SteamHost.PARTNER mode.
public static Option.Builder create()
Creates a new instance of Option.Builder.
Copyright © 2017. All rights reserved.