More Related Content
Recently uploaded (9)
PDF
猟B初AutoPrompt: Eliciting Knowledge from Language Models with Automatically ...Toru Tamaki?
PDF
猟B初Unbiasing through Textual Descriptions: Mitigating Representation Bias i...Toru Tamaki?
PDF
Forguncy 10 u瞳古勣Y創 - ノ`コ`ドWebアプリ_kプラットフォ`ムフォ`ガンシ`?
Featured (20)
PDF
Storytelling For The Web: Integrate Storytelling in your Design ProcessChiara Aliotta?
PDF
How to Leverage AI to Boost Employee Wellness - Lydia Di Francesco - SocialHR...SocialHRCamp?
PDF
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts?
PDF
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow?
PDF
Content Methodology: A Best Practices Report (Webinar)contently?
PPTX
How to Prepare For a Successful Job Search for 2024Albert Qian?
PDF
5 Public speaking tips from TED - Visualized summarySpeakerHub?
PDF
ChatGPT and the Future of Work - Clark Boyd Clark Boyd?
PDF
Getting into the tech field. what next Tessa Mero?
PDF
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray?
赫顎温厩温の胆龍しい奮へ?圭
- 6. collect
? Lists
List<String> list1 = Lists.newArrayList();
List<String> list2 = Lists.newArrayList(^hoge ̄,  ̄fuga ̄);
final List<String> list3 = ImmutableList.of(^tako ̄,  ̄ika ̄);
- 7. collect
? Lists
List<User> userList = getUserList();
// ^taro ̄, ̄hanako ̄
List<String> idList = Lists.transform(userList,
new Function<User, String>() {
@Override
public String apply(User user) {
return user.getId();
}
});
- 10. base
? Splitter
String val = ^apple orange,peach ̄;
CharMatcher matcher = CharMatcher.WHITESPACE
.or(CharMatcher.is(?,?));
// ^apple ̄, ̄orange ̄, ̄peach ̄
Iterable<String> split =
Splitter.on(matcher).omitEmptyStrings().split(val);
- 13. io
? Files
BufferedReader reader = null;
try {
reader = Files.newReader(
new File(^hoge.txt ̄), Charsets.UTF_8);
} finally {
Closeables.closeQuietly(reader);
}
- 14. io
? Files
List<String> lines = Files.readLines(
new File(^fuga.txt ̄), Charsets.UTF_8);
byte[] bytes = Files.toByteArray(new File(^sample.jpg ̄));