Class Key<S>

java.lang.Object
csw.params.core.generics.Key<S>
All Implemented Interfaces:
Serializable, scala.Equals, scala.Product
Direct Known Subclasses:
GChoiceKey

public class Key<S> extends Object implements scala.Product, Serializable
A generic Key class. Never meant to be instantiated directly. KeyType exposes allowed types of Keys and make method to create instances of Key.

param: keyName the name of the key param: keyType reference to an object of type KeyType[S] param: units applicable units

See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    Key(String keyName, KeyType<S> keyType, Units units, scala.reflect.ClassTag<S> evidence$1)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    equals(Object that)
    Equals this Key instance with other by the keyName
    int
     
     
     
    set(S value, Object... values)
    Sets the values for the key using a variable number of arguments
    set(S value, scala.collection.immutable.Seq<S> values)
    Sets the values for the key using a variable number of arguments
    setAll(Object values)
    Set values against this key
    Returns a string representation of Key as keyName
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface scala.Equals

    canEqual

    Methods inherited from interface scala.Product

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

    • Key

      public Key(String keyName, KeyType<S> keyType, Units units, scala.reflect.ClassTag<S> evidence$1)
  • Method Details

    • set

      public Parameter<S> set(S value, Object... values)
      Sets the values for the key using a variable number of arguments

      Parameters:
      values - one or more values
      Returns:
      an instance of Parameter[S] containing the key name, values (call withUnits() on the result to set the units)
    • keyName

      public String keyName()
    • keyType

      public KeyType<S> keyType()
    • units

      public Units units()
    • setAll

      public Parameter<S> setAll(Object values)
      Set values against this key

      Parameters:
      values - an Array of values
      Returns:
      an instance of Parameter[S] containing the key name, values (call withUnits() on the result to set the units)
    • set

      public Parameter<S> set(S value, scala.collection.immutable.Seq<S> values)
      Sets the values for the key using a variable number of arguments

      Parameters:
      values - one or more values
      Returns:
      an instance of Parameter[S] containing the key name, values (call withUnits() on the result to set the units)
    • toString

      public String toString()
      Returns a string representation of Key as keyName
      Overrides:
      toString in class Object
      Returns:
      (undocumented)
    • equals

      public boolean equals(Object that)
      Equals this Key instance with other by the keyName

      Specified by:
      equals in interface scala.Equals
      Overrides:
      equals in class Object
      Parameters:
      that - the other Key instance that is to be equated against this Key instance
      Returns:
      a Boolean indicating whether two Key instances are equal or not
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object