I was thinking in the common example orders, that can be in different statates. From create to pending to accept, accepted, sent... and so on.
But the order has data too, for example the client, the address to deliver, coments and another information that can be modified depending on the state. For example, the address can be change before it is sent, the comments shouldn't be modified since the order is prepared and so on. For that, I would bave behaviors like SetAddress(), SetComments()... and so on.
Also I can add items to the order, but only when it is in created state, or initial state. So it depends on the state too.
I can considerate the state pattern to control which actions can I do depending on the state. For that, for each state class, I have to implement the method SetAddress(), SetComments(), AddItem(), StateToPrepared(), StateToSent(), StateTodelivered()...
So at the end, the order will delegate all the behaviour to the state classes, and state classes would be so big because it would have all the ligic of the order.
So this makes me to think that really I don't understand the state pattern, so would like to clear this doubts.
Thanks.