Main Page | Class Hierarchy | Data Structures | Directories | File List | Data Fields | Related Pages

PartKey.java

00001 /*-
00002  * See the file LICENSE for redistribution information.
00003  *
00004  * Copyright (c) 2002-2005
00005  *      Sleepycat Software.  All rights reserved.
00006  *
00007  * $Id: PartKey.java,v 12.2 2005/06/16 20:22:38 bostic Exp $
00008  */
00009 
00010 package collections.ship.marshal;
00011 
00012 import com.sleepycat.bind.tuple.TupleInput;
00013 import com.sleepycat.bind.tuple.TupleOutput;
00014 
00024 public class PartKey implements MarshalledKey {
00025 
00026     private String number;
00027 
00028     public PartKey(String number) {
00029 
00030         this.number = number;
00031     }
00032 
00033     public final String getNumber() {
00034 
00035         return number;
00036     }
00037 
00038     public String toString() {
00039 
00040         return "[PartKey: number=" + number + ']';
00041     }
00042 
00043     // --- MarshalledKey implementation ---
00044 
00045     PartKey() {
00046 
00047         // A no-argument constructor is necessary only to allow the binding to
00048         // instantiate objects of this class.
00049     }
00050 
00051     public void unmarshalKey(TupleInput keyInput) {
00052 
00053         this.number = keyInput.readString();
00054     }
00055 
00056     public void marshalKey(TupleOutput keyOutput) {
00057 
00058         keyOutput.writeString(this.number);
00059     }
00060 }

Generated on Sun Dec 25 12:14:26 2005 for Berkeley DB 4.4.16 by  doxygen 1.4.2