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

com.enonic.xp.node.SnapshotResults Maven / Gradle / Ivy

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

import java.util.LinkedHashSet;
import java.util.Set;

import com.google.common.collect.ImmutableSet;

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

@PublicApi
public class SnapshotResults
    extends AbstractImmutableEntitySet
{
    private SnapshotResults( final Builder builder )
    {
        super( ImmutableSet.copyOf( builder.snapshotResults ) );
    }

    public static Builder create()
    {

        return new Builder();
    }

    public static class Builder
    {
        private final Set snapshotResults = new LinkedHashSet<>();


        public Builder add( final SnapshotResult snapshotResult )
        {
            this.snapshotResults.add( snapshotResult );
            return this;
        }

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

    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy