Could Thread class in java be an example of state pattern. As state pattern says "encapsulate state based behavior and delegate behavior to the current state".
however in thread class all the states are defined as enum not as encapsulated state with their behavior so it should not be. Please clarify
Aucun commentaire:
Enregistrer un commentaire