本文整理汇总了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));
}