• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src/router/db-4.8.30/examples_java/src/collections/ship/index/
1/*-
2 * See the file LICENSE for redistribution information.
3 *
4 * Copyright (c) 2002-2009 Oracle.  All rights reserved.
5 *
6 * $Id$
7 */
8
9package collections.ship.index;
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 data 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