00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 package collections.ship.sentity;
00011
00012 import java.io.Serializable;
00013
00032 public class Shipment implements Serializable {
00033
00034 private transient String partNumber;
00035 private transient String supplierNumber;
00036 private int quantity;
00037
00038 public Shipment(String partNumber, String supplierNumber, int quantity) {
00039
00040 this.partNumber = partNumber;
00041 this.supplierNumber = supplierNumber;
00042 this.quantity = quantity;
00043 }
00044
00049 void setKey(String partNumber, String supplierNumber) {
00050
00051 this.partNumber = partNumber;
00052 this.supplierNumber = supplierNumber;
00053 }
00054
00055 public final String getPartNumber() {
00056
00057 return partNumber;
00058 }
00059
00060 public final String getSupplierNumber() {
00061
00062 return supplierNumber;
00063 }
00064
00065 public final int getQuantity() {
00066
00067 return quantity;
00068 }
00069
00070 public String toString() {
00071
00072 return "[Shipment: part=" + partNumber +
00073 " supplier=" + supplierNumber +
00074 " quantity=" + quantity + ']';
00075 }
00076 }