<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Sealed Classes on BradCypert.com</title>
    <link>https://www.bradcypert.com/tags/sealed-classes/</link>
    <description>Recent content in Sealed Classes on BradCypert.com</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Tue, 27 Dec 2022 16:51:00 -0500</lastBuildDate>
    <atom:link href="https://www.bradcypert.com/tags/sealed-classes/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Kotlin Sealed Classes</title>
      <link>https://www.bradcypert.com/kotlin-sealed-classes/</link>
      <pubDate>Fri, 19 Oct 2018 00:00:00 +0000</pubDate>
      <guid>https://www.bradcypert.com/kotlin-sealed-classes/</guid>
      <description>&lt;p&gt;Kotlin has a concept known as sealed hierarchies (several other languages implement this feature as well). In Kotlin, we can generate a sealed hierarchy through the use of sealed classes.&lt;/p&gt;&#xA;&lt;h2 id=&#34;what-are-sealed-classes&#34;&gt;What are Sealed Classes?&lt;/h2&gt;&#xA;&lt;p&gt;Sealed classes are basically an extension to an enum class. They offer similar functionality with a few key differences. Similarly:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The class can not be instantiated directly&lt;/li&gt;&#xA;&lt;li&gt;The type can be represented as a type from a limited set, but not from any type outside of the set.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Differences however, are the important part:&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
