public static List < VM > vmsFromJSON ( Model mo , JSONArray a ) throws JSONConverterException { String json = a . toJSONString ( ) ; List < VM > s = vmsCache . get ( json ) ; if ( s != null ) { return s ; } s = new ArrayList <> ( a . size ( ) ) ; for ( Object o : a ) { s . add ( getVM ( mo , ( int ) o ) ) ; } vmsCache . put ( json , s ) ; return s ; }
Convert an array of VM identifiers to a set of VMs . This operation uses a cache of previously converted set of VMs .