1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.ldap.server.partition.impl.btree;
18
19
20 /***
21 * A key/value tuple for simple two column Tables. Implemented to provide
22 * independence from the Jdbm Tuple class. Key and value copying should be
23 * performed to transpose jdbm.helper.Tuple data into our generic Tuple.
24 *
25 * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
26 * @version $Rev: 264732 $
27 */
28 public class Tuple
29 {
30 /*** the key for this Tuple */
31 private Object key;
32 /*** the value for this Tuple */
33 private Object value;
34
35
36 /***
37 * Do nothing default that has a null key and null value.
38 */
39 public Tuple()
40 {
41
42 }
43
44
45 /***
46 * Creates a Tuple using a key and a value.
47 *
48 * @param key the key to set
49 * @param value the value to set
50 */
51 public Tuple( Object key, Object value )
52 {
53 this.key = key;
54 this.value = value;
55 }
56
57
58 /***
59 * Gets the key for this Tuple.
60 *
61 * @return the Tuple's key
62 */
63 public Object getKey()
64 {
65 return key;
66 }
67
68
69 /***
70 * Sets the key for this Tuple.
71 *
72 * @param key the new key to set
73 */
74 public void setKey( Object key )
75 {
76 this.key = key;
77 }
78
79
80 /***
81 * Gets the value for this Tuple.
82 *
83 * @return the Tuple's value
84 */
85 public Object getValue()
86 {
87 return value;
88 }
89
90
91 /***
92 * Sets the value for this Tuple.
93 *
94 * @param value the new value to set
95 */
96 public void setValue( Object value )
97 {
98 this.value = value;
99 }
100 }