01: /*-
02: * See the file LICENSE for redistribution information.
03: *
04: * Copyright (c) 2002,2008 Oracle. All rights reserved.
05: *
06: * $Id: SupplierData.java,v 1.13.2.2 2008/01/07 15:14:01 cwl Exp $
07: */
08:
09: package collections.ship.index;
10:
11: import java.io.Serializable;
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 data 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 {
24:
25: private String name;
26: private int status;
27: private String city;
28:
29: public SupplierData(String name, int status, String city) {
30:
31: this .name = name;
32: this .status = status;
33: this .city = city;
34: }
35:
36: public final String getName() {
37:
38: return name;
39: }
40:
41: public final int getStatus() {
42:
43: return status;
44: }
45:
46: public final String getCity() {
47:
48: return city;
49: }
50:
51: public String toString() {
52:
53: return "[SupplierData: name=" + name + " status=" + status
54: + " city=" + city + ']';
55: }
56: }
|