01: /*-
02: * See the file LICENSE for redistribution information.
03: *
04: * Copyright (c) 2002,2008 Oracle. All rights reserved.
05: *
06: * $Id: ShipmentData.java,v 1.11.2.2 2008/01/07 15:14:00 cwl Exp $
07: */
08:
09: package collections.ship.entity;
10:
11: import java.io.Serializable;
12:
13: /**
14: * A ShipmentData serves as the value in the key/value pair for a shipment
15: * entity.
16: *
17: * <p> In this sample, ShipmentData is used only as the storage data for the
18: * value, while the Shipment object is used as the value's object
19: * representation. Because it is used directly as storage data using
20: * serial format, it must be Serializable. </p>
21: *
22: * @author Mark Hayes
23: */
24: public class ShipmentData implements Serializable {
25:
26: private int quantity;
27:
28: public ShipmentData(int quantity) {
29:
30: this .quantity = quantity;
31: }
32:
33: public final int getQuantity() {
34:
35: return quantity;
36: }
37:
38: public String toString() {
39:
40: return "[ShipmentData: quantity=" + quantity + ']';
41: }
42: }
|