本文整理汇总了Java中systems.uom.quantity.Information类的典型用法代码示例。如果您正苦于以下问题:Java Information类的具体用法?Java Information怎么用?Java Information使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Information类属于systems.uom.quantity包,在下文中一共展示了Information类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: main
import systems.uom.quantity.Information; //导入依赖的package包/类
public static void main(String[] args) {
Quantity<Mass> carat = Quantities.getQuantity(100, CARAT);
System.out.println(carat);
Quantity<Mass> caratsInKg = carat.to(Units.KILOGRAM);
System.out.println(caratsInKg);
Quantity<Information> bit = Quantities.getQuantity(20, BIT);
System.out.println(bit);
Quantity<Information> bytes = bit.to(BYTE);
System.out.println(bytes);
Unit pressure = Units.PASCAL;
System.out.println(pressure);
// Quantity<InformationRate> bps = Quantities.getQuantity(10, BIT_PER_SECOND);
// System.out.println(bps);
Quantity<Length> len = Quantities.getQuantity(10, PARSEC);
System.out.println(len);
}
示例2: main
import systems.uom.quantity.Information; //导入依赖的package包/类
public static void main(String[] args) {
ServiceProvider.current().getSystemOfUnitsService().getSystemOfUnits("CLDR");
// Unit test = BYTE; // To initialize the system (lazy loading, otherwise Format is not updated)
Unit x = AbstractUnit.parse("B");
System.out.println(x);
Unit y = AbstractUnit.parse("N");
System.out.println(y);
UnitFormat unitFormat = SimpleUnitFormat.getInstance();
Unit<Information> bit = unitFormat.parse("bit").asType(Information.class);
System.out.println(bit);
Unit<Information> byteU = unitFormat.parse("byte").asType(Information.class);
System.out.println(byteU);
// System.out.println(BYTE.equals(byteU));
}
示例3: main
import systems.uom.quantity.Information; //导入依赖的package包/类
public static void main(String[] args) {
ServiceProvider.current().getSystemOfUnitsService().getSystemOfUnits("CLDR");
// Unit test = BYTE;
Unit x = AbstractUnit.parse("B");
System.out.println(x);
Unit y = AbstractUnit.parse("N");
System.out.println(y);
UnitFormat unitFormat = SimpleUnitFormat.getInstance();
Unit<Information> bit = unitFormat.parse("bit").asType(Information.class);
System.out.println(bit);
Unit<Information> byteU = unitFormat.parse("byte").asType(Information.class);
System.out.println(byteU);
// System.out.println(BYTE.equals(byteU));
UnitFormat format2 = EBNFUnitFormat.getInstance();
System.out.println(format2.format(FOOT));
System.out.println(format2.format(Units.AMPERE));
System.out.println(format2.format(METER));
System.out.println(format2.format(CENTIMETER));
System.out.println(format2.format(MILLIMETER));
System.out.println(format2.format(INCH));
System.out.println(format2.format(YARD));
System.out.println(format2.format(KILOGRAM));
System.out.println(format2.format(GRAM));
}
示例4: SpaceScale
import systems.uom.quantity.Information; //导入依赖的package包/类
private SpaceScale(int pmUnitsValue, Unit<Information> unit) {
this.pmUnitsValue = pmUnitsValue;
this.unit = unit;
}
示例5: getUnit
import systems.uom.quantity.Information; //导入依赖的package包/类
@Override
public Unit<Information> getUnit() {
return unit;
}
示例6: getSystemUnit
import systems.uom.quantity.Information; //导入依赖的package包/类
@Override
public Unit<Information> getSystemUnit() {
return REF_UNIT;
}
示例7: BitQuantity
import systems.uom.quantity.Information; //导入依赖的package包/类
public BitQuantity() {
super(Information.class);
}
示例8: add
import systems.uom.quantity.Information; //导入依赖的package包/类
public Quantity<Information> add(
Quantity<Information> that) {
// TODO Auto-generated method stub
return null;
}
示例9: subtract
import systems.uom.quantity.Information; //导入依赖的package包/类
public Quantity<Information> subtract(
Quantity<Information> that) {
// TODO Auto-generated method stub
return null;
}
示例10: to
import systems.uom.quantity.Information; //导入依赖的package包/类
public Quantity<Information> to(Unit<Information> unit) {
// TODO Auto-generated method stub
return null;
}
示例11: divide
import systems.uom.quantity.Information; //导入依赖的package包/类
public Quantity<Information> divide(Number that) {
// TODO Auto-generated method stub
return null;
}
示例12: inverse
import systems.uom.quantity.Information; //导入依赖的package包/类
public Quantity<Information> inverse() {
// TODO Auto-generated method stub
return null;
}