KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > collections > ship > basic > SupplierData


1 /*-
2  * See the file LICENSE for redistribution information.
3  *
4  * Copyright (c) 2002,2006 Oracle. All rights reserved.
5  *
6  * $Id: SupplierData.java,v 1.13 2006/10/30 21:13:55 bostic Exp $
7  */

8
9 package collections.ship.basic;
10
11 import java.io.Serializable JavaDoc;
12
13 /**
14  * A SupplierData serves as the data in the key/data pair for a supplier
15  * entity.
16  *
17  * <p> In this sample, SupplierData is used both as the storage entry for the
18  * data as well as the object binding to the data. Because it is used
19  * directly as storage data using serial format, it must be Serializable. </p>
20  *
21  * @author Mark Hayes
22  */

23 public class SupplierData implements Serializable JavaDoc {
24
25     private String JavaDoc name;
26     private int status;
27     private String JavaDoc city;
28
29     public SupplierData(String JavaDoc name, int status, String JavaDoc city) {
30
31         this.name = name;
32         this.status = status;
33         this.city = city;
34     }
35
36     public final String JavaDoc getName() {
37
38         return name;
39     }
40
41     public final int getStatus() {
42
43         return status;
44     }
45
46     public final String JavaDoc getCity() {
47
48         return city;
49     }
50
51     public String JavaDoc toString() {
52
53         return "[SupplierData: name=" + name +
54         " status=" + status +
55         " city=" + city + ']';
56     }
57 }
58
Popular Tags