public static int stringToVariableTest(String str){
  if (str.equals(rbean.getString("SignalHeadStateRed"))) {
    return Conditional.TYPE_SIGNAL_HEAD_RED;
  }
 else   if (str.equals(rbean.getString("SignalHeadStateYellow"))) {
    return Conditional.TYPE_SIGNAL_HEAD_YELLOW;
  }
 else   if (str.equals(rbean.getString("SignalHeadStateGreen"))) {
    return Conditional.TYPE_SIGNAL_HEAD_GREEN;
  }
 else   if (str.equals(rbean.getString("SignalHeadStateDark"))) {
    return Conditional.TYPE_SIGNAL_HEAD_DARK;
  }
 else   if (str.equals(rbean.getString("SignalHeadStateFlashingRed"))) {
    return Conditional.TYPE_SIGNAL_HEAD_FLASHRED;
  }
 else   if (str.equals(rbean.getString("SignalHeadStateFlashingYellow"))) {
    return Conditional.TYPE_SIGNAL_HEAD_FLASHYELLOW;
  }
 else   if (str.equals(rbean.getString("SignalHeadStateFlashingGreen"))) {
    return Conditional.TYPE_SIGNAL_HEAD_FLASHGREEN;
  }
 else   if (str.equals(rbean.getString("SignalHeadStateLunar"))) {
    return Conditional.TYPE_SIGNAL_HEAD_LUNAR;
  }
 else   if (str.equals(rbean.getString("SignalHeadStateFlashingLunar"))) {
    return Conditional.TYPE_SIGNAL_HEAD_FLASHLUNAR;
  }
  if (str.length() > 0) {
    log.warn("Unexpected parameter to stringToVariableTest(" + str + ")");
  }
  return -1;
}

public static int stringToVariableTest ( String str ) { if ( str . equals ( rbean . getString ( "SignalHeadStateRed" ) ) ) { return Conditional . TYPE_SIGNAL_HEAD_RED ; } else if ( str . equals ( rbean . getString ( "SignalHeadStateYellow" ) ) ) { return Conditional . TYPE_SIGNAL_HEAD_YELLOW ; } else if ( str . equals ( rbean . getString ( "SignalHeadStateGreen" ) ) ) { return Conditional . TYPE_SIGNAL_HEAD_GREEN ; } else if ( str . equals ( rbean . getString ( "SignalHeadStateDark" ) ) ) { return Conditional . TYPE_SIGNAL_HEAD_DARK ; } else if ( str . equals ( rbean . getString ( "SignalHeadStateFlashingRed" ) ) ) { return Conditional . TYPE_SIGNAL_HEAD_FLASHRED ; } else if ( str . equals ( rbean . getString ( "SignalHeadStateFlashingYellow" ) ) ) { return Conditional . TYPE_SIGNAL_HEAD_FLASHYELLOW ; } else if ( str . equals ( rbean . getString ( "SignalHeadStateFlashingGreen" ) ) ) { return Conditional . TYPE_SIGNAL_HEAD_FLASHGREEN ; } else if ( str . equals ( rbean . getString ( "SignalHeadStateLunar" ) ) ) { return Conditional . TYPE_SIGNAL_HEAD_LUNAR ; } else if ( str . equals ( rbean . getString ( "SignalHeadStateFlashingLunar" ) ) ) { return Conditional . TYPE_SIGNAL_HEAD_FLASHLUNAR ; } if ( str . length ( ) > 0 ) { log . warn ( "Unexpected parameter to stringToVariableTest(" + str + ")" ) ; } return - 1 ; }
identifies action data from text string note : if string does not correspond to an action data as defined in conditionalaction , returns - 1 .
