public boolean hasState(String id) {
        return stateIndex.containsKey(id);
    }
Returns true if there is currently a state associated with the specified
ID.

@param id the AppState ID
@return true if found, otherwise false
jme3-core/src/main/java/com/jme3/app/state/AppStateManager.java