joptsimple.util
Class KeyValuePair

java.lang.Object
  extended by 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.

Version:
$Id: KeyValuePair.java,v 1.8 2009/03/06 20:35:08 pholser Exp $
Author:
Paul Holser

Field Summary
 String key
           
 String value
           
 
Method Summary
 boolean equals(Object that)
          
 int hashCode()
          
 String toString()
          
static KeyValuePair valueOf(String stringRepresentation)
          Parses a string assumed to be of the form key=value into its parts.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

key

public final String key

value

public final String value
Method Detail

valueOf

public static KeyValuePair valueOf(String stringRepresentation)
Parses a string assumed to be of the form key=value into its parts.

Parameters:
stringRepresentation - 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


© Copyright 2004-2009 Paul R. Holser, Jr. All rights reserved. Licensed under The MIT License. pholser@alumni.rice.edu