• 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 ShipmentKey serves as the key in the key/data pair for a shipment entity.
15 *
16 * <p> In this sample, ShipmentKey is used both as the storage data for the key
17 * as well as the object binding to the key.  Because it is used directly as
18 * storage data using serial format, it must be Serializable. </p>
19 *
20 * @author Mark Hayes
21 */
22public class ShipmentKey implements Serializable {
23
24    private String partNumber;
25    private String supplierNumber;
26
27    public ShipmentKey(String partNumber, String supplierNumber) {
28
29        this.partNumber = partNumber;
30        this.supplierNumber = supplierNumber;
31    }
32
33    public final String getPartNumber() {
34
35        return partNumber;
36    }
37
38    public final String getSupplierNumber() {
39
40        return supplierNumber;
41    }
42
43    public String toString() {
44
45        return "[ShipmentKey: supplier=" + supplierNumber +
46	    " part=" + partNumber + ']';
47    }
48}
49