本文整理匯總了Java中happy.coding.io.Strings.setSeparator方法的典型用法代碼示例。如果您正苦於以下問題:Java Strings.setSeparator方法的具體用法?Java Strings.setSeparator怎麽用?Java Strings.setSeparator使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類happy.coding.io.Strings
的用法示例。
在下文中一共展示了Strings.setSeparator方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: toString
import happy.coding.io.Strings; //導入方法依賴的package包/類
@Override
public String toString()
{
StringBuilder sb = new StringBuilder();
Strings.setSeparator(new Separator(" / "));
sb.append("Name: " + name + "\n");
sb.append("id: " + id + "\n");
sb.append("Year: " + year + "\n");
sb.append("Url: " + douban_url + "\n\n");
sb.append("Average Rating: " + avg_rating + "\n");
sb.append("Num of Ratings: " + num_ratings + "\n");
sb.append("Distr. Ratings: " + Strings.toString(ratio_rates) + "\n\n");
sb.append("Director: " + director + "\n");
sb.append("Scenarist: " + Strings.toString(scenarist) + "\n");
sb.append("Actors: " + Strings.toString(actors) + "\n");
sb.append("Types: " + Strings.toString(types) + "\n");
sb.append("Official Url: " + official_url + "\n");
sb.append("Countries: " + Strings.toString(countries) + "\n");
sb.append("Language: " + Strings.toString(language) + "\n");
sb.append("Release Date: " + releseDates + "\n");
sb.append("Length: " + length + "\n");
sb.append("Alias: " + Strings.toString(alias) + "\n");
sb.append("IMDB Url: " + imdb_url + "\n\n");
sb.append("Description:\n" + description);
return sb.toString();
}
示例2: toString
import happy.coding.io.Strings; //導入方法依賴的package包/類
@Override
public String toString()
{
StringBuilder sb = new StringBuilder();
Strings.setSeparator(new Separator(" / "));
sb.append("Name: " + name + "\n");
sb.append("Sub Name: " + sub_name + "\n");
sb.append("id: " + id + "\n");
sb.append("Main Point: " + main_point + "\n");
sb.append("Url: " + gm_url + "\n\n");
sb.append("Average Rating: " + avg_rating + "\n");
sb.append("Num of Ratings: " + num_ratings + "\n\n");
//sb.append("Distr. Ratings: " + Strings.toString(ratio_rates) + "\n\n");
sb.append("Director: " + director + "\n");
//sb.append("Scenarist: " + Strings.toString(scenarist) + "\n");
sb.append("Actors: " + Strings.toString(actors) + "\n");
sb.append("Types: " + Strings.toString(types) + "\n");
//sb.append("Official Url: " + official_url + "\n");
sb.append("Countries: " + Strings.toString(countries) + "\n");
sb.append("Language: " + Strings.toString(language) + "\n");
sb.append("Release Date: " + releseDates + "\n");
sb.append("Length: " + length + "\n");
//sb.append("Alias: " + Strings.toString(alias) + "\n");
//sb.append("IMDB Url: " + imdb_url + "\n\n");
sb.append("Description:\n" + description);
return sb.toString();
}
示例3: example
import happy.coding.io.Strings; //導入方法依賴的package包/類
@SuppressWarnings("unchecked")
@Test
public void example() {
List<Sortee> data = new ArrayList<>();
int N = 10;
for (int i = 0; i < N; i++)
data.add(new Sortee(Randoms.random()));
Strings.setSeparator(Separator.comma);
Logs.debug("Before : " + Strings.toString(data));
List<Sortee> raw = prepareData(data);
Sortor.insertion(raw);
Logs.debug("Insertion: " + Strings.toString(raw));
raw = prepareData(data);
Sortor.selection(raw);
Logs.debug("Selection: " + Strings.toString(raw));
raw = prepareData(data);
Sortor.bubble(raw);
Logs.debug("Bubble : " + Strings.toString(raw));
raw = prepareData(data);
Sortor.shell(raw);
Logs.debug("Shell : " + Strings.toString(raw));
raw = prepareData(data);
Sortor.comb(raw);
Logs.debug("Comb : " + Strings.toString(raw));
raw = prepareData(data);
raw = (List<Sortee>) Sortor.merge(raw);
Logs.debug("Merge : " + Strings.toString(raw));
}