Class Key<S>

  • All Implemented Interfaces:
    java.io.Serializable, scala.Equals, scala.Product
    Direct Known Subclasses:
    GChoiceKey

    public class Key<S>
    extends java.lang.Object
    implements scala.Product, java.io.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:
    Serialized Form
    • Constructor Summary

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

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object that)
      Equals this Key instance with other by the keyName
      int hashCode()  
      java.lang.String keyName()  
      KeyType<S> keyType()  
      Parameter<S> set​(S value, java.lang.Object... values)
      Sets the values for the key using a variable number of arguments
      Parameter<S> set​(S value, scala.collection.immutable.Seq<S> values)
      Sets the values for the key using a variable number of arguments
      Parameter<S> setAll​(java.lang.Object values)
      Set values against this key
      java.lang.String toString()
      Returns a string representation of Key as keyName
      Units units()  
      • 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 Detail

      • Key

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

      • set

        public Parameter<S> set​(S value,
                                java.lang.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 java.lang.String keyName()
      • units

        public Units units()
      • setAll

        public Parameter<S> setAll​(java.lang.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 java.lang.String toString()
        Returns a string representation of Key as keyName
        Overrides:
        toString in class java.lang.Object
        Returns:
        (undocumented)
      • equals

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

        Specified by:
        equals in interface scala.Equals
        Overrides:
        equals in class java.lang.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 java.lang.Object