在这里,我需要将fldValue的值分配给sipNumber。怎么做?这是代码:


 public static String getCiscoSipPhNo()
     {

         String sipNumber = "";

            Map skillsValueMap = ValidFieldValuesUtil
                    .getValueMap(ADPinEntryAppConstants.AD_PIN_ENTRY_APP_KEY);
            {
                Set<String> keySet = skillsValueMap.keySet();
            for ( String fldKey: keySet)
             {
                if(fldKey!= null && !fldKey.trim().equals("")
                        && fldKey.contains(CsdClient.getLifeCycle()))
                        {
                           String fldValue = (String) skillsValueMap.get(fldKey);
                           break;
                        }
              }
            sipNumber = (sipNumber != null && !sipNumber.trim().equalsIgnoreCase("") ? sipNumber : "");
            return sipNumber;
    }
    }

最佳答案

这应该工作...

字符串sipNumber =“”;
字符串fldValue =“”;

    Map skillsValueMap = ValidFieldValuesUtil
            .getValueMap(ADPinEntryAppConstants.AD_PIN_ENTRY_APP_KEY);
    {
        Set<String> keySet = skillsValueMap.keySet();
    for ( String fldKey: keySet)
     {
        if(fldKey!= null && !fldKey.trim().equals("")
                && fldKey.contains(CsdClient.getLifeCycle()))
                {
                   fldValue = (String) skillsValueMap.get(fldKey);
                   break;
                }
      }
    sipNumber = fldValue;
    return sipNumber;

10-06 05:35