src/main/java/org/intellimate/izou/sdk/frameworks/music/Capabilities.java
public static Optional<Capabilities> importFromResource(ResourceModel resourceModel, Context context) {
        Object resource = resourceModel.getResource();
        try {
            @SuppressWarnings("unchecked")
            HashMap<String, Boolean> hashMap = (HashMap<String, Boolean>) resource;
            return Optional.of(constructCapabilites(hashMap, context));
        } catch (ClassCastException e) {
            return Optional.empty();
        }
    }
public static Optional<Capabilities> importFromResource(ResourceModel resourceModel, Context context) {
        Object resource = resourceModel.getResource();
        try {
            @SuppressWarnings("unchecked")
            HashMap<String, Boolean> hashMap = (HashMap<String, Boolean>) resource;
            return Optional.of(constructCapabilites(hashMap, context));
        } catch (ClassCastException e) {
            return Optional.empty();
        }
    }
public static Optional < Capabilities > importFromResource ( ResourceModel resourceModel , Context context ) { Object resource = resourceModel . getResource ( ) ; try { @ SuppressWarnings ( "unchecked" ) HashMap < String , Boolean > hashMap = ( HashMap < String , Boolean > ) resource ; return Optional . of ( constructCapabilites ( hashMap , context ) ) ; } catch ( ClassCastException e ) { return Optional . empty ( ) ; } }
creates a TrackInfo from the resourceModel
@param resourceModel the resourceModel
@return the optional TrackInfo
creates a TrackInfo from the resourceModel