I new to java and I use the following code to retrive parameters
from link hash maped , my question if there is a shorter/better way to do it in JAVA ? 

The following code is working 

        LinkedHashMap<String, Object> SERVICES = (LinkedHashMap<String, Object>) mapSystemProvided.get("SERVICES");
        ArrayList<Object> apps = (ArrayList<Object>) SERVICES.get("apps");
        LinkedHashMap<String, Object> appsList = (LinkedHashMap<String, Object>) apps.get(0);
        LinkedHashMap<String, Object> credentials = (LinkedHashMap<String, Object>) appsList.get("credentials");
        
        HashMap<String, String> parameters = new HashMap<String, String>();
        parameters.put(ID, credentials.get(ID).toString());
        parameters.put(DEFAULTS, credentials.get(DEFAULTST).toString());
        
        return parameters;