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

de.saumya.mojo.gems.spec.GemRequirement Maven / Gradle / Ivy

There is a newer version: 3.0.5
Show newest version
package de.saumya.mojo.gems.spec;

import java.util.ArrayList;
import java.util.List;

/**
 * Gem::Requirement
 * 
 * @author cstamas
 */
public class GemRequirement
{
    private List requirements;

    private String version;

    public List getRequirements()
    {
        if ( requirements == null )
        {
            requirements = new ArrayList();
        }

        return requirements;
    }

    public void setRequirements( List requirements )
    {
        this.requirements = requirements;
    }

    public void addRequirement( String relation, GemVersion version )
    {
        ArrayList tupple = new ArrayList( 2 );

        tupple.add( relation );

        tupple.add( version );

        getRequirements().add( tupple );
    }

    public String getVersion()
    {
        return version;
    }

    public void setVersion( String version )
    {
        this.version = version;
    }
}