All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.openstack4j.model.common.resolvers.StableServiceVersionResolver Maven / Gradle / Ivy

package org.openstack4j.model.common.resolvers;

import java.util.SortedSet;

import org.openstack4j.api.types.ServiceType;
import org.openstack4j.model.identity.Access.Service;

/**
 * Resolves each service to the lowest version which we consider most stable and tested
 * 
 * @author Jeremy Unruh
 */
public final class StableServiceVersionResolver implements ServiceVersionResolver {

    public static final StableServiceVersionResolver INSTANCE = new StableServiceVersionResolver();
    
    private StableServiceVersionResolver() { 
    }
    
    @Override
    public Service resolve(ServiceType type, SortedSet services) {
        return services.first();
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy