<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>taedium</author_name>
  <author_url>https://blog.hatena.ne.jp/taedium/</author_url>
  <blog_title>taediumの日記</blog_title>
  <blog_url>https://taedium.hatenadiary.org/</blog_url>
  <categories>
  </categories>
  <description>昨日のコードをGenericsに対応させてみました。 これで任意の型を返せます。 戻り値を返したくない場合はHogeSwitchにVoid型を渡すことになると思います、たぶん。 public enum Hoge { FOO { public &lt;T&gt; T accept(HogeSwitch&lt;T&gt; sw) { return sw.foo(); } }, BAR { public &lt;T&gt; T accept(HogeSwitch&lt;T&gt; sw) { return sw.bar(); } }; public abstract &lt;T&gt; T accept(HogeSwitch&lt;T&gt; sw); public s…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftaedium.hatenadiary.org%2Fentry%2F20070402%2Fp1&quot; title=&quot;Enumに対するVisitorパターン(Generics対応) - taediumの日記&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>2007-04-02 00:00:01</published>
  <title>Enumに対するVisitorパターン(Generics対応)</title>
  <type>rich</type>
  <url>https://taedium.hatenadiary.org/entry/20070402/p1</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
