KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > collections > ship > entity > PartKey


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

8
9 package collections.ship.entity;
10
11 import java.io.Serializable JavaDoc;
12
13 /**
14  * A PartKey serves as the key in the key/data pair for a part entity.
15  *
16  * <p> In this sample, PartKey is used both as the storage entry for the key as
17  * 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  */

22 public class PartKey implements Serializable JavaDoc {
23
24     private String JavaDoc number;
25
26     public PartKey(String JavaDoc number) {
27
28         this.number = number;
29     }
30
31     public final String JavaDoc getNumber() {
32
33         return number;
34     }
35
36     public String JavaDoc toString() {
37
38         return "[PartKey: number=" + number + ']';
39     }
40 }
41
Popular Tags