00001 package cedar.hepdata.util;
00002
00006 public enum SiPrefix {
00007 YOTTA (24, "Y", "Y"),
00008 ZETTA (21, "Z", "Z"),
00009 EXA (18, "E", "E"),
00010 PETA (15, "P", "P"),
00011 TERA (12, "T", "T"),
00012 GIGA (9, "G", "G"),
00013 MEGA (6, "M", "M"),
00014 KILO (3, "k", "k"),
00015 UNIT (0, "", ""),
00016 MILLI (-3, "m", "m"),
00017 MICRO (-6, "u", "µ"),
00018 NANO (-9, "n", "n"),
00019 PICO (-12, "p", "p"),
00020 FEMTO (-15, "f", "f"),
00021 ATTO (-18, "a", "a"),
00022 ZEPTO (-21, "z", "z"),
00023 YOCTA (-24, "y", "y");
00024 private final Integer powerOf10;
00025 private final String asciirep;
00026 private final String htmlrep;
00027
00028 SiPrefix(Integer powerOf10, String asciirep, String htmlrep) {
00029 this.powerOf10 = powerOf10;
00030 this.asciirep = asciirep;
00031 this.htmlrep = htmlrep;
00032 }
00033 public Integer powerOf10() { return powerOf10; }
00034 public String toString() { return asciirep; }
00035 public String toHtmlString() { return htmlrep; }
00036 }