01: /*
02: * $Id: Holder.java,v 1.2 2002/09/16 08:05:03 jkl Exp $
03: *
04: * Copyright (c) 2002 Njet Communications Ltd. All Rights Reserved.
05: *
06: * Use is subject to license terms, as defined in
07: * Anvil Sofware License, Version 1.1. See LICENSE
08: * file, or http://njet.org/license-1.1.txt
09: */
10: package anvil.java.util;
11:
12: /**
13: * Interface for holding key-value pair.
14: *
15: * @author Jani Lehtimäki
16: */
17: public interface Holder {
18:
19: /**
20: * Retrieves key.
21: *
22: * @return Key
23: */
24: public Object getKey();
25:
26: /**
27: * Retrieves value.
28: *
29: * @return Value
30: */
31: public Object getValue();
32:
33: /**
34: * Sets the value.
35: *
36: * @param value New value
37: * @return Old value
38: */
39: public Object setValue(Object value);
40:
41: /**
42: * Removes this holder from structure it is held in.
43: */
44: public Object remove();
45:
46: }
|