Class Choices

java.lang.Object
csw.params.core.models.Choices
All Implemented Interfaces:
Serializable, scala.Equals, scala.Product

public class Choices extends Object implements scala.Product, Serializable
Represents a set of choices

param: values a Set of Choice

See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    Choices(scala.collection.immutable.Set<Choice> values)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    contains(Choice choice)
    A helper method to determine if the provided choice is present in the set of choices this instance holds
    static Choices
    from(String... choices)
    Creates Choices from provided String values
    static Choices
    from(Set<String> choices)
     
    static Choices
    from(scala.collection.immutable.Seq<String> choices)
    Creates Choices from provided String values
    static Choices
    fromChoices(Choice... choices)
    Creates Choices from provided values
    static Choices
     
    static Choices
    fromChoices(scala.collection.immutable.Seq<Choice> choices)
    Creates Choices from provided values
    A Java helper to get all choices this instance holds
    A comma separated string representation of all choices this instance holds
    scala.collection.immutable.Set<Choice>
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface scala.Equals

    canEqual, equals

    Methods inherited from interface scala.Product

    productArity, productElement, productElementName, productElementNames, productIterator, productPrefix
  • Constructor Details

    • Choices

      public Choices(scala.collection.immutable.Set<Choice> values)
  • Method Details

    • from

      public static Choices from(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<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(Set<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
    • fromChoices

      public static Choices fromChoices(Set<Choice> 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 String toString()
      A comma separated string representation of all choices this instance holds
      Overrides:
      toString in class Object
      Returns:
      (undocumented)
    • jValues

      public List<Choice> jValues()
      A Java helper to get all choices this instance holds

      Returns: