<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>tototoshi</author_name>
  <author_url>https://blog.hatena.ne.jp/tototoshi/</author_url>
  <blog_title>tototoshi の日記</blog_title>
  <blog_url>https://tototoshi.hatenablog.com/</blog_url>
  <categories>
    <anon>Scala</anon>
  </categories>
  <description>NantokaBuilder().setHoge(&quot;hoge&quot;).setFoo(&quot;bar&quot;)...build() のようにプロパティを足していって作る必要がある Nantoka クラスがあったとします。 Java でもたまに見かけますね。チェーンできると使いやすくてうれしい。 ただ、困ったことにsetXXX はいつも自分の型を返しますので、 作ってる途中で我慢できずにbuildしてもコンパイルが通り、不完全なインスタンスが出来上がってしまい、 実行→突然の死！！ということが起こります。 コンパイルが通っているからって正しい使い方をしているとは限らない。 なんとかしたい。 普通の Builder…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftototoshi.hatenablog.com%2Fentry%2F20120602%2F1338624041&quot; title=&quot;Scalaで型安全Builderパターン - tototoshi の日記&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2012-06-02 17:00:41</published>
  <title>Scalaで型安全Builderパターン</title>
  <type>rich</type>
  <url>https://tototoshi.hatenablog.com/entry/20120602/1338624041</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
