This method retrieves the State object representing the entity's current state. Note that the method is private, as the State object is not exposed outside of the entity - callers which require to know the entity's state must use getLifecycleState instead.
The relevant State object is retrieved by looking it up in the map of states.
/** * @return The State object representing the current state of * this entity */ private State<MYLIFECYCLEENTITYSTATEEntry> getState() { return states.get(getLifecycleState()); }