Class Pair

java.lang.Object
com.mimecast.robin.mx.util.Pair

public class Pair extends Object
Pair key/value store.

Takes a single string input and splits by = (equals) character.

Provides validation by checking both key and value and not empty.

Author:
"Vlad Marian" (vmarian@mimecast.com)
  • Field Details

    • log

      private static final org.apache.logging.log4j.Logger log
    • key

      private String key
      Key string.
    • value

      private String value
      Value string.
  • Constructor Details

    • Pair

      public Pair(String data)
      Constructs a new Pair instance with given string.
      Parameters:
      data - The pair string in the format "key:value".
  • Method Details

    • getKey

      public String getKey()
      Gets key.
      Returns:
      String.
    • getValue

      public String getValue()
      Gets value.
      Returns:
      String.
    • isValid

      public boolean isValid()
      Is valid.
      Returns:
      Boolean.
    • toString

      public String toString()
      To String.
      Overrides:
      toString in class Object
      Returns:
      String.