<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>bleis-tift</author_name>
  <author_url>https://blog.hatena.ne.jp/bleis-tift/</author_url>
  <blog_title>ぐるぐる～</blog_title>
  <blog_url>https://bleis-tift.hatenablog.com/</blog_url>
  <categories>
    <anon>Program</anon>
  </categories>
  <description>「リファクタリング」の「ガード節による条件記述の置き換え」 って項目がまさに、 ifの入れ子になるような処理を、関数の最初で値検査してreturn(あるいは例外をスロー)に置き換えるって話だったと思います。 途中でreturn編 ちょっとりふぁくと - 神様なんて信じない僕らのために これですね。 double getPayAmount() { double result; if (_isDead) result = deadAmount(); else { if (_isSeparated) result = separatedAmount(); else { if (_isRetired)…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fbleis-tift.hatenablog.com%2Fentry%2F20090124%2F1232768059&quot; title=&quot;ガード節による入れ子条件記述の置き換え - ぐるぐる～&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>2009-01-24 12:34:19</published>
  <title>ガード節による入れ子条件記述の置き換え</title>
  <type>rich</type>
  <url>https://bleis-tift.hatenablog.com/entry/20090124/1232768059</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
