Class Property


public class Property extends CollectionElement
Postman SDK analog: Not directly related, but probably close to PropertyBase

Utility class to store key-value pairs with additional, optional description and type properties

  • Constructor Details

    • Property

      public Property(String key, String value, String description)
      Constructs a Property with the specified properties. The type property is set to null
      Parameters:
      key - Value for the key property. NOTE: If a null key is provided it will be transformed to an empty string ("");
      value - Value for the value property
      description - Value for the description proptery
    • Property

      public Property(String key, String value, String description, String type)
      Constructs a Property with all specified properties.
      Parameters:
      key - Value for the key property. NOTE: If a null key is provided it will be transformed to an empty string ("");
      value - Value for the value property
      description - Value for the description property
      type - Value for the type property
    • Property

      public Property(String key, String value)
      Constructs a Property with with just key and value properties
      Parameters:
      key - Value for the key property. NOTE: If a null key is provided it will be transformed to an empty string ("");
      value - Value for the value property
  • Method Details

    • getToken

      public String getToken()
      Returns the Postman token for a variable, eg. the key surrounded by double curly braces {{}}
      Returns:
      String The postman token
    • getKey

      public String getKey()
      returns the value of the key property
      Specified by:
      getKey in class CollectionElement
      Returns:
      String
    • setDescription

      public void setDescription(String desc)
      Sets the description property
      Parameters:
      desc -
    • getDescription

      public String getDescription()
      Returns the description property, or null if it is not set
      Returns:
      String
    • setKey

      public void setKey(String key)
      Sets the key value for this property
      Parameters:
      key -
    • getValue

      public String getValue()
      Sets the value property for this property
      Returns:
      String
    • setValue

      public void setValue(String value)
      Sets the value property for this variable
      Parameters:
      value - The value
    • getType

      public String getType()
      Returns the type property for this variable
      Returns:
      String the type
    • setType

      public void setType(String type)
      Sets the type property for this variable
      Parameters:
      type - The type, e.g., "string" or "boolean"
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
      Parameters:
      obj -
      Returns:
      boolean