• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/ap/gpl/timemachine/db-4.7.25.NC/examples_java/src/collections/ship/tuple/
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:31 bostic Exp $
7 */
8
9package collections.ship.tuple;
10
11import 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 */
24public 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}
43