@Test public void testContentRatingsToString_nullInput() { assertEquals(null, TvContractUtils.contentRatingsToString(null)); }
public static String contentRatingsToString(TvContentRating[] contentRatings) { if (contentRatings == null || contentRatings.length == 0) { return null; } StringBuilder ratings = new StringBuilder(contentRatings[0].flattenToString()); for (int i = 1; i < contentRatings.length; ++i) { ratings.append(DELIMITER); ratings.append(contentRatings[i].flattenToString()); } return ratings.toString(); }
TvContractUtils { public static String contentRatingsToString(TvContentRating[] contentRatings) { if (contentRatings == null || contentRatings.length == 0) { return null; } StringBuilder ratings = new StringBuilder(contentRatings[0].flattenToString()); for (int i = 1; i < contentRatings.length; ++i) { ratings.append(DELIMITER); ratings.append(contentRatings[i].flattenToString()); } return ratings.toString(); } }
TvContractUtils { public static String contentRatingsToString(TvContentRating[] contentRatings) { if (contentRatings == null || contentRatings.length == 0) { return null; } StringBuilder ratings = new StringBuilder(contentRatings[0].flattenToString()); for (int i = 1; i < contentRatings.length; ++i) { ratings.append(DELIMITER); ratings.append(contentRatings[i].flattenToString()); } return ratings.toString(); } private  TvContractUtils(); }
TvContractUtils { public static String contentRatingsToString(TvContentRating[] contentRatings) { if (contentRatings == null || contentRatings.length == 0) { return null; } StringBuilder ratings = new StringBuilder(contentRatings[0].flattenToString()); for (int i = 1; i < contentRatings.length; ++i) { ratings.append(DELIMITER); ratings.append(contentRatings[i].flattenToString()); } return ratings.toString(); } private  TvContractUtils(); static TvContentRating[] stringToContentRatings(String commaSeparatedRatings); static String contentRatingsToString(TvContentRating[] contentRatings); static String[] stringToAudioLanguages(String commaSeparatedString); static String audioLanguagesToString(String[] audioLanguages); }
TvContractUtils { public static String contentRatingsToString(TvContentRating[] contentRatings) { if (contentRatings == null || contentRatings.length == 0) { return null; } StringBuilder ratings = new StringBuilder(contentRatings[0].flattenToString()); for (int i = 1; i < contentRatings.length; ++i) { ratings.append(DELIMITER); ratings.append(contentRatings[i].flattenToString()); } return ratings.toString(); } private  TvContractUtils(); static TvContentRating[] stringToContentRatings(String commaSeparatedRatings); static String contentRatingsToString(TvContentRating[] contentRatings); static String[] stringToAudioLanguages(String commaSeparatedString); static String audioLanguagesToString(String[] audioLanguages);  }