public void setCurrentActionStateByUserData(T t) {
		updateStates();
		for (ActionState<T> actionState : actionStates) {

			// Note: most clients will pass a T that is already in our list.  However, to be more
			//       flexible, such as for clients with a T class of String, we should have no
			//       problem using equals() here.
			// if (actionState.getUserData() == t) {
			if (actionState.getUserData().equals(t)) {
				doSetCurrentActionState(actionState, EventTrigger.API_CALL);
				return;
			}
		}

		throw new AssertException(
			"Attempted to set an action state by a user type not contained herein: " + t);
	}
Add the supplied {@code ActionState}.

@param actionState the {@code ActionState} to add
Ghidra/Framework/Docking/src/main/java/docking/menu/MultiStateDockingAction.java