• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt-6.x.4708/router/db-4.8.30/examples_java/src/collections/ship/index/
1/*-
2 * See the file LICENSE for redistribution information.
3 *
4 * Copyright (c) 2002-2009 Oracle.  All rights reserved.
5 *
6 * $Id$
7 */
8
9package collections.ship.index;
10
11import 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 */
23public 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 +
54	    " status=" + status +
55	    " city=" + city + ']';
56    }
57}
58