<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>hjm333</author_name>
  <author_url>https://blog.hatena.ne.jp/hjm333/</author_url>
  <blog_title>The King's Museum</blog_title>
  <blog_url>https://hjm333.hatenablog.com/</blog_url>
  <categories>
    <anon>Java</anon>
    <anon>Effective Java</anon>
  </categories>
  <description>オブジェクトを生成するために public コンストラクタの他に static ファクトリーメソッドを用意するとよいでしょう。 static ファクトリーメソッドとは、インスタンスを返す単なる static メソッドのことです。 例えば、Java の Boolean では次のような static ファクトリーメソッドが提供されています。 public static Boolean valueOf (boolean b) { return b ? Boolean.TRUE : Boolean.FALSE; } なお、GoF のデザインパターンで議論される「ファクトリーメソッド」とは異なるので注意…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fhjm333.hatenablog.com%2Fentry%2F2018%2F02%2F16%2F222951&quot; title=&quot;【Effective Java 3rd】Item 1: Consider static factory methods instead of constructors - The King&amp;#39;s Museum&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>https://images-fe.ssl-images-amazon.com/images/I/51wl8cINKYL._SL160_.jpg</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2018-02-16 22:29:51</published>
  <title>【Effective Java 3rd】Item 1: Consider static factory methods instead of constructors</title>
  <type>rich</type>
  <url>https://hjm333.hatenablog.com/entry/2018/02/16/222951</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
