1 |
/* |
/* |
2 |
* $Id$ |
* Pair.java |
3 |
* Copyright (C) 2003 The Free Software Foundation |
* Copyright (C) 2003 The Free Software Foundation |
4 |
* |
* |
5 |
* This file is part of GNU inetlib, a library. |
* This file is part of GNU inetlib, a library. |
45 |
* The key is always a String, and the value must be a List. |
* The key is always a String, and the value must be a List. |
46 |
* |
* |
47 |
* @author <a href='mailto:dog@gnu.org'>Chris Burdess</a> |
* @author <a href='mailto:dog@gnu.org'>Chris Burdess</a> |
|
* @version $Revision$ $Date$ |
|
48 |
*/ |
*/ |
49 |
public final class Pair |
public final class Pair |
50 |
{ |
{ |
52 |
private String key; |
private String key; |
53 |
private List value; |
private List value; |
54 |
|
|
55 |
Pair (String key, List value) |
Pair(String key, List value) |
56 |
{ |
{ |
57 |
this.key = key; |
this.key = key; |
58 |
this.value = value; |
this.value = value; |
59 |
} |
} |
60 |
|
|
61 |
/** |
/** |
62 |
* Returns the key part of this pair. |
* Returns the key part of this pair. |
63 |
*/ |
*/ |
64 |
public String getKey () |
public String getKey() |
65 |
{ |
{ |
66 |
return key; |
return key; |
67 |
} |
} |
68 |
|
|
69 |
/** |
/** |
70 |
* Returns the value part of this pair. |
* Returns the value part of this pair. |
71 |
*/ |
*/ |
72 |
public List getValue () |
public List getValue() |
73 |
{ |
{ |
74 |
return value; |
return value; |
75 |
} |
} |
76 |
|
|
77 |
public String toString () |
public String toString() |
78 |
{ |
{ |
79 |
return key + value; |
return key + value; |
80 |
} |
} |
81 |
|
|
82 |
} |
} |
83 |
|
|