@Test public void testIsbnFormat() { Assert.assertNull("isbn format should be null", IsbnUtil.isbnFormat(null)); for (final Entry<String, String> entry : IsbnUtilTestCases.getIsbnFormatCases().entrySet()) { Assert.assertEquals("isbn format failed", entry.getKey(), IsbnUtil.isbnFormat(entry.getValue())); } }
public static String isbnFormat(final String pstring) { if (pstring == null) { return null; } final int length = isbnCompress(pstring).length(); if (length > Isbn10Validator.ISBN10_LENGTH) { return isbn13Format(pstring); } else { return isbn10Format(pstring); } }
IsbnUtil { public static String isbnFormat(final String pstring) { if (pstring == null) { return null; } final int length = isbnCompress(pstring).length(); if (length > Isbn10Validator.ISBN10_LENGTH) { return isbn13Format(pstring); } else { return isbn10Format(pstring); } } }
IsbnUtil { public static String isbnFormat(final String pstring) { if (pstring == null) { return null; } final int length = isbnCompress(pstring).length(); if (length > Isbn10Validator.ISBN10_LENGTH) { return isbn13Format(pstring); } else { return isbn10Format(pstring); } }  }
IsbnUtil { public static String isbnFormat(final String pstring) { if (pstring == null) { return null; } final int length = isbnCompress(pstring).length(); if (length > Isbn10Validator.ISBN10_LENGTH) { return isbn13Format(pstring); } else { return isbn10Format(pstring); } }  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 String isbnFormat(final String pstring) { if (pstring == null) { return null; } final int length = isbnCompress(pstring).length(); if (length > Isbn10Validator.ISBN10_LENGTH) { return isbn13Format(pstring); } else { return isbn10Format(pstring); } }  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; }