Class KeyValuePair

java.lang.Object
joptsimple.util.KeyValuePair

public final class KeyValuePair extends Object

A simple string key/string value pair.

This is useful as an argument type for options whose values take on the form key=value, such as JVM command line system properties.

  • Field Details

    • key

      public final String key
    • value

      public final String value
  • Constructor Details

    • KeyValuePair

      private KeyValuePair(String key, String value)
  • Method Details

    • valueOf

      public static KeyValuePair valueOf(String asString)
      Parses a string assumed to be of the form key=value into its parts.
      Parameters:
      asString - key-value string
      Returns:
      a key-value pair
      Throws:
      NullPointerException - if stringRepresentation is null
    • equals

      public boolean equals(Object that)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object