Why go through this extra step? Why but just set the Item with the Stein in the first place?
There is. They are called lambdas. But if you stay to head down that path you usually end up with long brittle code that doesn’t work that well.
What you are trying to do is actually written up as a design pattern. Design Pattern: Separation of Behaviors
An alternative approach to what @vzorglub recommends (note the typo, it’s missing the second.= In the if statement) is
if(receivedCommand instance of DecimalType) //do number stuff