1/*-
2 * See the file LICENSE for redistribution information.
3 *
4 * Copyright (c) 2002,2008 Oracle.  All rights reserved.
5 *
6 * $Id: ShipmentData.java,v 12.7 2008/01/08 20:58:28 bostic Exp $
7 */
8
9package collections.ship.basic;
10
11import java.io.Serializable;
12
13/**
14 * A ShipmentData serves as the data in the key/data pair for a shipment
15 * entity.
16 *
17 * <p> In this sample, ShipmentData is used both as the storage entry 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 ShipmentData implements Serializable {
24
25    private int quantity;
26
27    public ShipmentData(int quantity) {
28
29        this.quantity = quantity;
30    }
31
32    public final int getQuantity() {
33
34        return quantity;
35    }
36
37    public String toString() {
38
39        return "[ShipmentData: quantity=" + quantity + ']';
40    }
41}
42