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

com.enonic.xp.page.PageDescriptors Maven / Gradle / Ivy

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

import java.util.Collection;

import com.google.common.collect.ImmutableList;

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

@PublicApi
public final class PageDescriptors
    extends AbstractImmutableEntityList
{
    private PageDescriptors( final ImmutableList list )
    {
        super( list );
    }

    public static PageDescriptors empty()
    {
        return new PageDescriptors( ImmutableList.of() );
    }

    public static PageDescriptors from( final PageDescriptor... pageDescriptors )
    {
        return pageDescriptors != null ? new PageDescriptors( ImmutableList.copyOf( pageDescriptors ) ) : PageDescriptors.empty();
    }

    public static PageDescriptors from( final Iterable pageDescriptors )
    {
        return pageDescriptors != null ? new PageDescriptors( ImmutableList.copyOf( pageDescriptors ) ) : PageDescriptors.empty();
    }

    public static PageDescriptors from( final Collection pageDescriptors )
    {
        return pageDescriptors != null ? new PageDescriptors( ImmutableList.copyOf( pageDescriptors ) ) : PageDescriptors.empty();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy