com.croftsoft.core.lang
Class Pair
java.lang.Object
com.croftsoft.core.lang.Pair
- All Implemented Interfaces:
- Serializable
public final class Pair
- extends Object
- implements Serializable
An immutable name-value pair where name is never null.
Java 1.1 compatible.
- Since:
- 2001-06-07
- Version:
- 2001-09-13
- See Also:
- Serialized Form
- Author:
- David Wallace Croft
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
name
public final String name
value
public final String value
Pair
public Pair(String name,
String value)
- Constructor method.
- Parameters:
name
- Must not be null.value
- May be null.
- Throws:
NullArgumentException
- If name is null.
getName
public String getName()
getValue
public String getValue()
toPairs
public static Pair[] toPairs(String[] names)
- Converts an array of names to an array of Pairs with null values.
CroftSoft Core Javadoc (2008-09-28 20:58:02)