| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| MutablePair |
|
| 0.0;0 |
| 1 | /* | |
| 2 | Copyright 2004-2008 Paul R. Holser, Jr. All rights reserved. | |
| 3 | Licensed under the Academic Free License version 3.0 | |
| 4 | */ | |
| 5 | ||
| 6 | package jaggregate.internal; | |
| 7 | ||
| 8 | import jaggregate.Pair; | |
| 9 | ||
| 10 | /** | |
| 11 | * A {@link jaggregate.Pair} whose values can be changed. | |
| 12 | * | |
| 13 | * @param <K> the type of the pair's key | |
| 14 | * @param <V> the type of the pair's value | |
| 15 | * @author <a href="mailto:pholser@alumni.rice.edu">Paul Holser</a> | |
| 16 | * @version $Id: MutablePair.java,v 1.2 2008/03/30 03:07:11 pholser Exp $ | |
| 17 | */ | |
| 18 | public class MutablePair<K, V> extends Pair<K, V> { | |
| 19 | private static final long serialVersionUID = -1L; | |
| 20 | ||
| 21 | /** | |
| 22 | * Creates a pair. | |
| 23 | * | |
| 24 | * @param key the new pair's key | |
| 25 | * @param value the new pair's value | |
| 26 | */ | |
| 27 | public MutablePair( K key, V value ) { | |
| 28 | 8533 | super( key, value ); |
| 29 | 8533 | } |
| 30 | ||
| 31 | /** | |
| 32 | * Gives this pair a new value. | |
| 33 | * | |
| 34 | * @param value the pair's new value | |
| 35 | */ | |
| 36 | public void setValue( V value ) { | |
| 37 | 616 | this.value = value; |
| 38 | 616 | } |
| 39 | } |