1 /*- 2 * Copyright (c) 2002, 2020 Oracle and/or its affiliates. All rights reserved. 3 * 4 * See the file EXAMPLES-LICENSE for license information. 5 * 6 */ 7 8 package collections.ship.basic; 9 10 import java.io.Serializable; 11 12 /** 13 * A SupplierKey serves as the key in the key/data pair for a supplier entity. 14 * 15 * <p>In this sample, SupplierKey is used both as the storage entry for the key 16 * as well as the object binding to the key. Because it is used directly as 17 * storage data using serial format, it must be Serializable. </p> 18 * 19 * @author Mark Hayes 20 */ 21 public class SupplierKey implements Serializable { 22 23 private final String number; 24 SupplierKey(String number)25 public SupplierKey(String number) { 26 27 this.number = number; 28 } 29 getNumber()30 public final String getNumber() { 31 32 return number; 33 } 34 35 @Override toString()36 public String toString() { 37 38 return "[SupplierKey: number=" + number + ']'; 39 } 40 } 41