@Test public void testOsBits() { assertEquals(OperatingSystems.bits().apply("UBUNTU_12_64").intValue(), 64); assertEquals(OperatingSystems.bits().apply("UBUNTU_12_32").intValue(), 32); }
public static Function<String, Integer> bits() { return new Function<String, Integer>() { @Override public Integer apply(String operatingSystemReferenceCode) { if (operatingSystemReferenceCode != null) { return Ints.tryParse(getLast(Splitter.on("_").split(operatingSystemReferenceCode))); } return null; } }; }
OperatingSystems { public static Function<String, Integer> bits() { return new Function<String, Integer>() { @Override public Integer apply(String operatingSystemReferenceCode) { if (operatingSystemReferenceCode != null) { return Ints.tryParse(getLast(Splitter.on("_").split(operatingSystemReferenceCode))); } return null; } }; } }
OperatingSystems { public static Function<String, Integer> bits() { return new Function<String, Integer>() { @Override public Integer apply(String operatingSystemReferenceCode) { if (operatingSystemReferenceCode != null) { return Ints.tryParse(getLast(Splitter.on("_").split(operatingSystemReferenceCode))); } return null; } }; }  }
OperatingSystems { public static Function<String, Integer> bits() { return new Function<String, Integer>() { @Override public Integer apply(String operatingSystemReferenceCode) { if (operatingSystemReferenceCode != null) { return Ints.tryParse(getLast(Splitter.on("_").split(operatingSystemReferenceCode))); } return null; } }; }  static Function<String, OsFamily> osFamily(); static Function<String, Integer> bits(); static Function<String, String> version(); }
OperatingSystems { public static Function<String, Integer> bits() { return new Function<String, Integer>() { @Override public Integer apply(String operatingSystemReferenceCode) { if (operatingSystemReferenceCode != null) { return Ints.tryParse(getLast(Splitter.on("_").split(operatingSystemReferenceCode))); } return null; } }; }  static Function<String, OsFamily> osFamily(); static Function<String, Integer> bits(); static Function<String, String> version();  }