@Test public void testIsbnFormatWithPos() { Assert.assertNull("isbn format should be null", IsbnUtil.isbnFormatWithPos(null)); for (final Entry<ValueWithPos<String>, ValueWithPos<String>> entry : IsbnUtilTestCases .getIsbnFormatWithPosCases().entrySet()) { Assert.assertEquals("isbn format failed", entry.getKey(), IsbnUtil.isbnFormatWithPos(entry.getValue())); } }
public static ValueWithPos<String> isbnFormatWithPos(final ValueWithPos<String> pentry) { if (pentry == null) { return null; } final int length = isbnCompress(pentry.getValue()).length(); if (length > Isbn10Validator.ISBN10_LENGTH) { return isbn13FormatWithPos(pentry); } else { return isbn10FormatWithPos(pentry); } }
IsbnUtil { public static ValueWithPos<String> isbnFormatWithPos(final ValueWithPos<String> pentry) { if (pentry == null) { return null; } final int length = isbnCompress(pentry.getValue()).length(); if (length > Isbn10Validator.ISBN10_LENGTH) { return isbn13FormatWithPos(pentry); } else { return isbn10FormatWithPos(pentry); } } }
IsbnUtil { public static ValueWithPos<String> isbnFormatWithPos(final ValueWithPos<String> pentry) { if (pentry == null) { return null; } final int length = isbnCompress(pentry.getValue()).length(); if (length > Isbn10Validator.ISBN10_LENGTH) { return isbn13FormatWithPos(pentry); } else { return isbn10FormatWithPos(pentry); } }  }
IsbnUtil { public static ValueWithPos<String> isbnFormatWithPos(final ValueWithPos<String> pentry) { if (pentry == null) { return null; } final int length = isbnCompress(pentry.getValue()).length(); if (length > Isbn10Validator.ISBN10_LENGTH) { return isbn13FormatWithPos(pentry); } else { return isbn10FormatWithPos(pentry); } }  static ValueWithPos<String> isbnFormatWithPos(final ValueWithPos<String> pentry); static String isbnFormat(final String pstring); static ValueWithPos<String> isbn10FormatWithPos(final ValueWithPos<String> pentry); static String isbn10Format(final String pstring); static ValueWithPos<String> isbn13FormatWithPos(final ValueWithPos<String> pentry); static String isbn13Format(final String pstring); static String isbnCompress(final String pstring); }
IsbnUtil { public static ValueWithPos<String> isbnFormatWithPos(final ValueWithPos<String> pentry) { if (pentry == null) { return null; } final int length = isbnCompress(pentry.getValue()).length(); if (length > Isbn10Validator.ISBN10_LENGTH) { return isbn13FormatWithPos(pentry); } else { return isbn10FormatWithPos(pentry); } }  static ValueWithPos<String> isbnFormatWithPos(final ValueWithPos<String> pentry); static String isbnFormat(final String pstring); static ValueWithPos<String> isbn10FormatWithPos(final ValueWithPos<String> pentry); static String isbn10Format(final String pstring); static ValueWithPos<String> isbn13FormatWithPos(final ValueWithPos<String> pentry); static String isbn13Format(final String pstring); static String isbnCompress(final String pstring); static final char SEPARATOR; }