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

org.openstack4j.openstack.storage.object.functions.ApplyContainerToObjectFunction Maven / Gradle / Ivy

There is a newer version: 3.2.0
Show newest version
package org.openstack4j.openstack.storage.object.functions;

import org.openstack4j.openstack.storage.object.domain.SwiftObjectImpl;

import com.google.common.base.Function;

/**
 * Applies a container name specified through the function creation to a Swift Object
 * 
 * @author Jeremy Unruh
 *
 */
public class ApplyContainerToObjectFunction implements Function{

    String containerName;
    
    private ApplyContainerToObjectFunction(String containerName) {
        this.containerName = containerName;
    }
    
    public static ApplyContainerToObjectFunction create(String containerName) {
        return new ApplyContainerToObjectFunction(containerName);
    }
    
    @Override
    public SwiftObjectImpl apply(SwiftObjectImpl obj) {
        obj.setContainerName(containerName);
        return obj;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy