00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 package collections.ship.sentity;
00011
00012 import java.io.Serializable;
00013
00022 public class Weight implements Serializable {
00023
00024 public final static String GRAMS = "grams";
00025 public final static String OUNCES = "ounces";
00026
00027 private double amount;
00028 private String units;
00029
00030 public Weight(double amount, String units) {
00031
00032 this.amount = amount;
00033 this.units = units;
00034 }
00035
00036 public final double getAmount() {
00037
00038 return amount;
00039 }
00040
00041 public final String getUnits() {
00042
00043 return units;
00044 }
00045
00046 public String toString() {
00047
00048 return "[" + amount + ' ' + units + ']';
00049 }
00050 }