1 8 9 package collections.ship.sentity; 10 11 import java.io.Serializable ; 12 13 31 public class Shipment implements Serializable { 32 33 private transient String partNumber; 34 private transient String supplierNumber; 35 private int quantity; 36 37 public Shipment(String partNumber, String supplierNumber, int quantity) { 38 39 this.partNumber = partNumber; 40 this.supplierNumber = supplierNumber; 41 this.quantity = quantity; 42 } 43 44 48 void setKey(String partNumber, String supplierNumber) { 49 50 this.partNumber = partNumber; 51 this.supplierNumber = supplierNumber; 52 } 53 54 public final String getPartNumber() { 55 56 return partNumber; 57 } 58 59 public final String getSupplierNumber() { 60 61 return supplierNumber; 62 } 63 64 public final int getQuantity() { 65 66 return quantity; 67 } 68 69 public String toString() { 70 71 return "[Shipment: part=" + partNumber + 72 " supplier=" + supplierNumber + 73 " quantity=" + quantity + ']'; 74 } 75 } 76 | Popular Tags |