From 02f0634ac29e19c68279e5544cac963e7f1203b8 Mon Sep 17 00:00:00 2001 From: Zhang Qiang Date: Tue, 29 May 2012 12:22:00 +0800 Subject: Sync source code from Tizen:Base --- .../src/collections/ship/basic/PartKey.java | 40 ++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 examples_java/src/collections/ship/basic/PartKey.java (limited to 'examples_java/src/collections/ship/basic/PartKey.java') diff --git a/examples_java/src/collections/ship/basic/PartKey.java b/examples_java/src/collections/ship/basic/PartKey.java new file mode 100644 index 0000000..851362f --- /dev/null +++ b/examples_java/src/collections/ship/basic/PartKey.java @@ -0,0 +1,40 @@ +/*- + * See the file LICENSE for redistribution information. + * + * Copyright (c) 2002-2009 Oracle. All rights reserved. + * + * $Id$ + */ + +package collections.ship.basic; + +import java.io.Serializable; + +/** + * A PartKey serves as the key in the key/data pair for a part entity. + * + *

In this sample, PartKey is used both as the storage entry for the key as + * well as the object binding to the key. Because it is used directly as + * storage data using serial format, it must be Serializable.

+ * + * @author Mark Hayes + */ +public class PartKey implements Serializable { + + private String number; + + public PartKey(String number) { + + this.number = number; + } + + public final String getNumber() { + + return number; + } + + public String toString() { + + return "[PartKey: number=" + number + ']'; + } +} -- cgit v1.2.3