public String [ ] getDeviceStateArray ( ) { final String [ ] array = new String [ deviceStateMap . size ( ) ] ; int i = 0 ; for ( final Map . Entry < String , DevState > deviceStateEntry : deviceStateMap . entrySet ( ) ) { final String deviceName = deviceStateEntry . getKey ( ) ; final DevState deviceState = deviceStateEntry . getValue ( ) ; array [ i ++ ] = deviceName + " - " + StateUtilities . getNameForState ( deviceState ) ; } return array ; }
return an array of String which contains deviceName and his state .