Package csw.params.core.models
Class Choices
- java.lang.Object
-
- csw.params.core.models.Choices
-
- All Implemented Interfaces:
java.io.Serializable,scala.Equals,scala.Product
public class Choices extends java.lang.Object implements scala.Product, java.io.SerializableRepresents a set of choicesparam: values a Set of Choice
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancontains(Choice choice)A helper method to determine if the provided choice is present in the set of choices this instance holdsstatic Choicesfrom(java.lang.String... choices)Creates Choices from provided String valuesstatic Choicesfrom(java.util.Set<java.lang.String> choices)static Choicesfrom(scala.collection.immutable.Seq<java.lang.String> choices)Creates Choices from provided String valuesstatic ChoicesfromChoices(Choice... choices)Creates Choices from provided valuesstatic ChoicesfromChoices(java.util.Set<Choice> choices)static ChoicesfromChoices(scala.collection.immutable.Seq<Choice> choices)Creates Choices from provided valuesjava.util.List<Choice>jValues()A Java helper to get all choices this instance holdsjava.lang.StringtoString()A comma separated string representation of all choices this instance holdsscala.collection.immutable.Set<Choice>values()
-
-
-
Constructor Detail
-
Choices
public Choices(scala.collection.immutable.Set<Choice> values)
-
-
Method Detail
-
from
public static Choices from(java.lang.String... choices)
Creates Choices from provided String values- Parameters:
choices- one or more choices in string format- Returns:
- an instance of Choices
-
fromChoices
public static Choices fromChoices(Choice... choices)
Creates Choices from provided values- Parameters:
choices- one or more choices- Returns:
- an instance of Choices
-
from
public static Choices from(scala.collection.immutable.Seq<java.lang.String> choices)
Creates Choices from provided String values- Parameters:
choices- one or more choices in string format- Returns:
- an instance of Choices
-
from
public static Choices from(java.util.Set<java.lang.String> choices)
-
fromChoices
public static Choices fromChoices(scala.collection.immutable.Seq<Choice> choices)
Creates Choices from provided values- Parameters:
choices- one or more choices- Returns:
- an instance of Choices
-
values
public scala.collection.immutable.Set<Choice> values()
-
contains
public boolean contains(Choice choice)
A helper method to determine if the provided choice is present in the set of choices this instance holds- Parameters:
choice- the choice value to find- Returns:
- a Boolean indicating whether the given choice is present or not
-
toString
public java.lang.String toString()
A comma separated string representation of all choices this instance holds- Overrides:
toStringin classjava.lang.Object- Returns:
- (undocumented)
-
jValues
public java.util.List<Choice> jValues()
A Java helper to get all choices this instance holds- Returns:
-
-