File Source: KeyValueObject.java
/*
P/P * Method: org.apache.roller.weblogger.ui.struts2.util.KeyValueObject__static_init
*/
1 /*
2 * Licensed to the Apache Software Foundation (ASF) under one or more
3 * contributor license agreements. The ASF licenses this file to You
4 * under the Apache License, Version 2.0 (the "License"); you may not
5 * use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License. For additional information regarding
15 * copyright in this work, please see the NOTICE file in the top level
16 * directory of this distribution.
17 */
18
19 package org.apache.roller.weblogger.ui.struts2.util;
20
21
22 /**
23 * A simple object to maintain a key/value pair.
24 */
25 public class KeyValueObject {
26
27 private Object key = null;
28 private Object value = null;
29
30
/*
P/P * Method: void org.apache.roller.weblogger.ui.struts2.util.KeyValueObject()
*
* Postconditions:
* this.key == null
* this.value == null
*/
31 public KeyValueObject() {}
32
/*
P/P * Method: void org.apache.roller.weblogger.ui.struts2.util.KeyValueObject(Object, Object)
*
* Postconditions:
* this.key == key
* init'ed(this.key)
* this.value == value
* init'ed(this.value)
*/
33 public KeyValueObject(Object key, Object value) {
34 this.setKey(key);
35 this.setValue(value);
36 }
37
38 public Object getKey() {
/*
P/P * Method: Object getKey()
*
* Preconditions:
* init'ed(this.key)
*
* Postconditions:
* return_value == this.key
* init'ed(return_value)
*/
39 return key;
40 }
41
42 public void setKey(Object key) {
/*
P/P * Method: void setKey(Object)
*
* Postconditions:
* this.key == key
* init'ed(this.key)
*/
43 this.key = key;
44 }
45
46 public Object getValue() {
/*
P/P * Method: Object getValue()
*
* Preconditions:
* init'ed(this.value)
*
* Postconditions:
* return_value == this.value
* init'ed(return_value)
*/
47 return value;
48 }
49
50 public void setValue(Object value) {
/*
P/P * Method: void setValue(Object)
*
* Postconditions:
* this.value == value
* init'ed(this.value)
*/
51 this.value = value;
52 }
53
54 }
SofCheck Inspector Build Version : 2.18479
| KeyValueObject.java |
2009-Jan-02 14:24:46 |
| KeyValueObject.class |
2009-Sep-04 03:12:45 |