com.sun.pkg.client

## Class Variant

- java.lang.Object
- - com.sun.pkg.client.Variant

-     public class Variant
      extends java.lang.Object

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Variant()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static boolean` | `isSelectedBy(java.util.Map<java.lang.String,java.lang.String> actionVariantTags, java.util.Map<java.lang.String,java.lang.String> imageVariants)` Returns true if all of the passed action variant tags are selected by the passed image variants.
    `static boolean` | `isSelectedBy(java.lang.String vname, java.lang.String vvalue, java.util.Map<java.lang.String,java.lang.String> imageVariants)` Returns true if the named Variant is selected by the list of Variants.
    `static void` | `main(java.lang.String[] args)`
    `static boolean` | `runTests()` Test method.
    `static void` | `testError(java.util.Map<java.lang.String,java.lang.String> actionVariantTags, java.util.Map<java.lang.String,java.lang.String> imageVariants, boolean expectedResult)`
    `static java.util.Map<java.lang.String,java.lang.String>` | `tokensToVariantTable(java.lang.String[] tokens)` Convert an array of tokens of the form "property=value" to a hashtable of variants.

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### Variant

          public Variant()

  - ### Method Detail

    - #### tokensToVariantTable

          public static java.util.Map<java.lang.String,java.lang.String> tokensToVariantTable(java.lang.String[] tokens)

      Convert an array of tokens of the form "property=value" to a hashtable of variants.
      Parameters:
        `tokens` -
      Returns:

    - #### isSelectedBy

          public static boolean isSelectedBy(java.lang.String vname,
                             java.lang.String vvalue,
                             java.util.Map<java.lang.String,java.lang.String> imageVariants)

      Returns true if the named Variant is selected by the list of Variants. Note that the assumption is that a variant will occur only once in the imageVariants. If a variant occurs more than once then the behavior of which variant is used to determine selection is not defined. If the variant is not in the imageVariants, then it is not selected If the variant is in the imageVariants and its value matches then it is selected. If the variant is in the imageVariants and its value does not match then it is not selected.

    - #### isSelectedBy

          public static boolean isSelectedBy(java.util.Map<java.lang.String,java.lang.String> actionVariantTags,
                             java.util.Map<java.lang.String,java.lang.String> imageVariants)

      Returns true if all of the passed action variant tags are selected by the passed image variants.

    - #### runTests

          public static boolean runTests()

      Test method.

    - #### testError

          public static void testError(java.util.Map<java.lang.String,java.lang.String> actionVariantTags,
                       java.util.Map<java.lang.String,java.lang.String> imageVariants,
                       boolean expectedResult)

    - #### main

          public static void main(java.lang.String[] args)