This method is to get a State object from the state name

@param stateName Name of the state
@return State object matching the name.
545766
@Override
    public StateContract getStateFromName(String countryAlternateCode, String stateName) {
        CountryContract country = getCountryFromCode(countryAlternateCode);

        return getKcStateService().getState(country.getCode(), stateName);
    }
299681
def get_statepostal(self, obj):
        """"""
        if obj.division.level.name == DivisionLevel.STATE:
            return us.states.lookup(obj.division.code).abbr
        elif obj.division.level.name == DivisionLevel.COUNTY:
            return us.states.lookup(obj.division.parent.code).abbr
        return None
226716
public String getByName(final String name) {
		if (headerMap == null) {
			throw new IllegalStateException("No header available");
		}

		final Integer col = headerMap.get(name);
		if (col != null) {
			return get(col);
		}
		return null;
	}
394234
public Object getStateProperty(String key) {
		if (!StringUtils.isBlank(key)) {
			return getDeviceState().get(key);
		}
		return null;
	}
576464
protected <S extends State> S getPartitionedState(StateDescriptor<S, ?> stateDescriptor) throws Exception {
		return getPartitionedState(VoidNamespace.INSTANCE, VoidNamespaceSerializer.INSTANCE, stateDescriptor);
	}
48
public static String getParamFromState(String state, String paramName) {

        String prefix = PARAM_SEPARATOR + paramName + PARAM_ASSIGN;
        if (state.contains(prefix)) {
            String result = state.substring(state.indexOf(prefix) + prefix.length());
            if (result.contains(PARAM_SEPARATOR)) {
                result = result.substring(0, result.indexOf(PARAM_SEPARATOR));
            }
            return CmsEncoder.decode(result, CmsEncoder.ENCODING_UTF_8);
        }
        return null;
    }
725015
public String stateName(
    int      state)
  {
    String name = "Unknown state = " + state;
    switch(state)
    {
      case NodeStack.VISIT_LEFT:
        name = "VISIT_LEFT";
        break;
      case NodeStack.PROCESS_CURRENT:
        name = "PROCESS_CURRENT";
        break;
      case NodeStack.VISIT_RIGHT:
        name = "VISIT_RIGHT";
        break;
      case NodeStack.DONE_VISITS:
        name = "DONE_VISITS";
        break;
    }
    return name;
  }
855754
def get_state(self) -> str:
        """"""
        xdoc = self.connection.soap_action('/ws/ControllerService',
                                           'getState', "")
        if xdoc:
            return xdoc.find('./SOAP-ENV:Body/ns1:getState1/ns1:state',
                             IHCSoapClient.ihcns).text
        return False
452902
public APIState getAPIState() {
		APIStateRequest request = new APIStateRequest();
		APIStateResponse response = resolveApitraryClient().send(request);

		APIState apiState = null;
		if (HttpStatus.OK.ordinal() == response.getStatusCode()) {
			String result = response.getResult();

			ObjectMapper objectMapper = new ObjectMapper();
			try {
				apiState = objectMapper.readValue(result, APIState.class);
			} catch (Exception e) {
				throw new MappingException(e);
			}
		} else {
			throw new CommunicationErrorException(HttpStatus.getStatus(response.getStatusCode()));
		}
		return apiState;
	}
926439
function(newState){

    // when called with no args, it's a getter
    if (arguments.length === 0) {
      return this._currentState.stateName;
    }

    // activate by name
    if(typeof newState == 'string'){

      this._activateStateNamed(newState);

    // activate by index
    } else if (typeof newState == 'number'){

      this._activateState(this._states[newState]);
    }

    return this;
  }
1192474
public static final synchronized StateManager getInstance(Object context) {
		
		return (instance == null)? 
				(instance = new StateService(ContextUtils.asApplication(context))) :instance;
	}
395216
public function initialize($stateName = null)
    {
        if (!$stateName) {
            $stateName = $this->initialStateName;
        }

        if (empty($this->states[$stateName])) {
            throw new \Exception('Passed name of current state is wrong');
        }

        $this->currentState = $this->states[$stateName];

        return $this;
    }
365218
public static String getTopicName(State state) {
    Preconditions.checkArgument(state.contains(KafkaSource.TOPIC_NAME),
        "Missing configuration property " + KafkaSource.TOPIC_NAME);

    return state.getProp(KafkaSource.TOPIC_NAME);
  }
1373402
public Object getValue(@NonNull String name) {
        if (name == null) { throw new IllegalArgumentException("name cannot be null."); }
        return map.get(name);
    }
758900
public function getTransitionsByStartingState($stateName)
    {
        return array_filter(
            $this->transitions,
            function (Transition $transition) use ($stateName) {
                return $transition
                    ->getStart()
                    ->getName() === $stateName;
            }
        );
    }
754292
public <T extends Serializable> T getStateObject(final Class<T> stateObjectClass) {
        return (T) stateObjects.get(stateObjectClass);
    }
100130
public static authenticationlocalpolicy_binding get(nitro_service service, String name) throws Exception{
		authenticationlocalpolicy_binding obj = new authenticationlocalpolicy_binding();
		obj.set_name(name);
		authenticationlocalpolicy_binding response = (authenticationlocalpolicy_binding) obj.get_resource(service);
		return response;
	}