Open topic with navigation

com.hp.lft.sdk

## Class EnvironmentDescription

- java.lang.Object
- - com.hp.lft.sdk.internal.PropertiesDescriptionBase
  - - com.hp.lft.sdk.PropertiesDescription
    - - com.hp.lft.sdk.EnvironmentDescription

- All Implemented Interfaces:
    CloneableObject, Description, com.hp.lft.sdk.internal.MapHolder, Cloneable

      public class EnvironmentDescription
      extends PropertiesDescription
      implements com.hp.lft.sdk.internal.MapHolder

  An object describing the environment that the test requires, in capability name-value pairs.
  For details on how to describe the capabilities, see https://admhelp.microfocus.com/leanft/en/latest/HelpCenter/Content/HowTo/LeanFT-grid-ready-tests.htm#Build.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `EnvironmentDescription.Builder` This class can be used to construct an instance of the EnvironmentDescription class using the builder pattern.
    `protected static class` | `EnvironmentDescription.Init<T extends EnvironmentDescription.Init<T>>` Helper class for EnvironmentDescription.Builder.

  - ### Field Summary

    - ### Fields inherited from class com.hp.lft.sdk.internal.PropertiesDescriptionBase

      `properties`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `EnvironmentDescription()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static EnvironmentDescription` | `fromMap(Map<String,Object> capabilities)` Creates a new instance of `EnvironmentDescription` and initializes it with the specified map of capabilities.
    `Object` | `get(String capability)` Returns the current value of an `EnvironmentDescription` capability.
    `Map<String,Object>` | `getMap()` For internal use only.
    `void` | `set(String capability, Object value)` Sets an `EnvironmentDescription` capability to the specified value.

    - ### Methods inherited from class com.hp.lft.sdk.PropertiesDescription

      `clone`

    - ### Methods inherited from class com.hp.lft.sdk.internal.PropertiesDescriptionBase

      `cloneTo, getValueAs, getValueAsStringProperty, insertValue`

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

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

- - ### Constructor Detail

    - #### EnvironmentDescription

          public EnvironmentDescription()

  - ### Method Detail

    - #### fromMap

          public static EnvironmentDescription fromMap(Map<String,Object> capabilities)
                                                throws GeneralLeanFtException

      Creates a new instance of `EnvironmentDescription` and initializes it with the specified map of capabilities.
      Parameters:
        `capabilities` - A `Map` of capabilities to initialize the `EnvironmentDescription` with.
      Returns:
        a new instance of `EnvironmentDescription` initialized with the specified capabilities.
      Throws:
        `GeneralLeanFtException`

    - #### set

          public void set(String capability,
                 Object value)
                   throws GeneralLeanFtException

      Sets an `EnvironmentDescription` capability to the specified value.
      Parameters:
        `capability` - The name of the capability to set a value for.
        `value` - The new value of the capability.
      Throws:
        `GeneralLeanFtException` - if the set operation fails.

    - #### get

          public Object get(String capability)
                     throws GeneralLeanFtException

      Returns the current value of an `EnvironmentDescription` capability.
      Parameters:
        `capability` - The capability whose value to return.
      Returns:
        the current value of an `EnvironmentDescription` capability.
      Throws:
        `GeneralLeanFtException` - if the get operation fails.

    - #### getMap

          public Map<String,Object> getMap()

      For internal use only.
      Specified by:
        `getMap` in interface `com.hp.lft.sdk.internal.MapHolder`
      Returns:
        for internal use only.