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

org.codehaus.plexus.archiver.util.DefaultArchivedFileSet Maven / Gradle / Ivy

There is a newer version: 4.10.0
Show newest version
package org.codehaus.plexus.archiver.util;

import java.io.File;
import javax.annotation.Nonnull;
import org.codehaus.plexus.archiver.ArchivedFileSet;

/**
 * Default implementation of {@link ArchivedFileSet}.
 *
 * @since 1.0-alpha-9
 */
public class DefaultArchivedFileSet
    extends AbstractFileSet
    implements ArchivedFileSet
{

    private File archive;

    public DefaultArchivedFileSet( @Nonnull File archive )
    {
        this.archive = archive;
    }

    @Override
    public File getArchive()
    {
        return archive;
    }

    public static DefaultArchivedFileSet archivedFileSet( File archiveFile )
    {
        if ( archiveFile == null )
        {
            throw new IllegalArgumentException( "Archive File cannot be null" );
        }
        return new DefaultArchivedFileSet( archiveFile );
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy