<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>State-Machine on Java &amp; Software Architecture Knowledge Hub</title><link>https://samirsahoo.github.io/design-patterns-hub/tags/state-machine/</link><description>Recent content in State-Machine on Java &amp; Software Architecture Knowledge Hub</description><generator>Hugo</generator><language>en-US</language><copyright>© 2026 Samir Kumar Sahoo (https://github.com/samirsahoo). All rights reserved.</copyright><atom:link href="https://samirsahoo.github.io/design-patterns-hub/tags/state-machine/index.xml" rel="self" type="application/rss+xml"/><item><title>State Pattern</title><link>https://samirsahoo.github.io/design-patterns-hub/design-patterns/behavioral/state/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://samirsahoo.github.io/design-patterns-hub/design-patterns/behavioral/state/</guid><description>&lt;h2 id="simple-definition"&gt;Simple definition&lt;a class="heading-anchor" href="#simple-definition" aria-label="Link to this section"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;The &lt;strong&gt;State&lt;/strong&gt; pattern moves state-specific behaviour into separate &lt;strong&gt;state objects&lt;/strong&gt;. The main object (the &lt;strong&gt;context&lt;/strong&gt;) delegates each request to its current state object, and the state object decides what to do and which state comes next. To the outside, the object appears to change its class.&lt;/p&gt;</description></item></channel></rss>