1 8 9 package collections.ship.tuple; 10 11 21 public class Shipment { 22 23 private String partNumber; 24 private String supplierNumber; 25 private int quantity; 26 27 public Shipment(String partNumber, String supplierNumber, int quantity) { 28 29 this.partNumber = partNumber; 30 this.supplierNumber = supplierNumber; 31 this.quantity = quantity; 32 } 33 34 public final String getPartNumber() { 35 36 return partNumber; 37 } 38 39 public final String getSupplierNumber() { 40 41 return supplierNumber; 42 } 43 44 public final int getQuantity() { 45 46 return quantity; 47 } 48 49 public String toString() { 50 51 return "[Shipment: part=" + partNumber + 52 " supplier=" + supplierNumber + 53 " quantity=" + quantity + ']'; 54 } 55 } 56 | Popular Tags |