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

org.apache.maven.model.PatternSet Maven / Gradle / Ivy

Go to download

Statistical sampling library for use in virtdata libraries, based on apache commons math 4

There is a newer version: 5.17.0
Show newest version
/*
 =================== DO NOT EDIT THIS FILE ====================
 Generated by Modello 1.0.1 on 2009-08-06 15:13:09,
 any modifications will be overwritten.
 ==============================================================
 */

package org.apache.maven.model;

/**
 * Definition of include or exclude patterns.
 * 
 * @version $Revision$ $Date$
 */
public class PatternSet
    implements java.io.Serializable
{

      //--------------------------/
     //- Class/Member Variables -/
    //--------------------------/

    /**
     * Field includes.
     */
    private java.util.List includes;

    /**
     * Field excludes.
     */
    private java.util.List excludes;


      //-----------/
     //- Methods -/
    //-----------/

    /**
     * Method addExclude.
     * 
     * @param string
     */
    public void addExclude( String string )
    {
        if ( !(string instanceof String) )
        {
            throw new ClassCastException( "PatternSet.addExcludes(string) parameter must be instanceof " + String.class.getName() );
        }
        getExcludes().add( string );
    } //-- void addExclude( String )

    /**
     * Method addInclude.
     * 
     * @param string
     */
    public void addInclude( String string )
    {
        if ( !(string instanceof String) )
        {
            throw new ClassCastException( "PatternSet.addIncludes(string) parameter must be instanceof " + String.class.getName() );
        }
        getIncludes().add( string );
    } //-- void addInclude( String )

    /**
     * Method getExcludes.
     * 
     * @return List
     */
    public java.util.List getExcludes()
    {
        if ( this.excludes == null )
        {
            this.excludes = new java.util.ArrayList();
        }

        return this.excludes;
    } //-- java.util.List getExcludes()

    /**
     * Method getIncludes.
     * 
     * @return List
     */
    public java.util.List getIncludes()
    {
        if ( this.includes == null )
        {
            this.includes = new java.util.ArrayList();
        }

        return this.includes;
    } //-- java.util.List getIncludes()

    /**
     * Method removeExclude.
     * 
     * @param string
     */
    public void removeExclude( String string )
    {
        if ( !(string instanceof String) )
        {
            throw new ClassCastException( "PatternSet.removeExcludes(string) parameter must be instanceof " + String.class.getName() );
        }
        getExcludes().remove( string );
    } //-- void removeExclude( String )

    /**
     * Method removeInclude.
     * 
     * @param string
     */
    public void removeInclude( String string )
    {
        if ( !(string instanceof String) )
        {
            throw new ClassCastException( "PatternSet.removeIncludes(string) parameter must be instanceof " + String.class.getName() );
        }
        getIncludes().remove( string );
    } //-- void removeInclude( String )

    /**
     * Set a list of patterns to exclude, e.g.
     * **/*.xml
     * 
     * @param excludes
     */
    public void setExcludes( java.util.List excludes )
    {
        this.excludes = excludes;
    } //-- void setExcludes( java.util.List )

    /**
     * Set a list of patterns to include, e.g.
     * **/*.xml.
     * 
     * @param includes
     */
    public void setIncludes( java.util.List includes )
    {
        this.includes = includes;
    } //-- void setIncludes( java.util.List )


            
    /**
     * @see java.lang.Object#toString()
     */
    public String toString()
    {
        StringBuffer sb = new StringBuffer();

        sb.append("PatternSet [includes: {");
        for (java.util.Iterator i = getIncludes().iterator(); i.hasNext(); )
        {
            String str = (String) i.next();
            sb.append(str).append(", ");
        }
        if (sb.substring(sb.length() - 2).equals(", ")) sb.delete(sb.length() - 2, sb.length());

        sb.append("}, excludes: {");
        for (java.util.Iterator i = getExcludes().iterator(); i.hasNext(); )
        {
            String str = (String) i.next();
            sb.append(str).append(", ");
        }
        if (sb.substring(sb.length() - 2).equals(", ")) sb.delete(sb.length() - 2, sb.length());

        sb.append("}]");
        return sb.toString();
    }
            
          
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy