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

com.enonic.xp.project.ProjectGraph Maven / Gradle / Ivy

There is a newer version: 7.14.4
Show newest version
package com.enonic.xp.project;

import com.google.common.collect.ImmutableList;

import com.enonic.xp.annotation.PublicApi;
import com.enonic.xp.support.AbstractImmutableEntityList;

@PublicApi
public final class ProjectGraph
    extends AbstractImmutableEntityList
{
    private ProjectGraph( final Builder builder )
    {
        super( builder.projects.build() );
    }

    public static Builder create()
    {
        return new Builder();
    }

    public static class Builder
    {
        private final ImmutableList.Builder projects = ImmutableList.builder();

        public Builder add( ProjectGraphEntry project )
        {
            this.projects.add( project );
            return this;
        }

        public ProjectGraph build()
        {
            return new ProjectGraph( this );
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy