KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > collections > ship > sentity > ShipmentKey


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

8
9 package collections.ship.sentity;
10
11 /**
12  * A ShipmentKey serves as the key in the key/data pair for a shipment entity.
13  *
14  * <p> In this sample, ShipmentKey is bound to the key's tuple storage entry
15  * using a TupleBinding. Because it is not used directly as storage data, it
16  * does not need to be Serializable. </p>
17  *
18  * @author Mark Hayes
19  */

20 public class ShipmentKey {
21
22     private String JavaDoc partNumber;
23     private String JavaDoc supplierNumber;
24
25     public ShipmentKey(String JavaDoc partNumber, String JavaDoc supplierNumber) {
26
27         this.partNumber = partNumber;
28         this.supplierNumber = supplierNumber;
29     }
30
31     public final String JavaDoc getPartNumber() {
32
33         return partNumber;
34     }
35
36     public final String JavaDoc getSupplierNumber() {
37
38         return supplierNumber;
39     }
40
41     public String JavaDoc toString() {
42
43         return "[ShipmentKey: supplier=" + supplierNumber +
44         " part=" + partNumber + ']';
45     }
46 }
47
Popular Tags