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

com.enonic.xp.content.ContentVersionId Maven / Gradle / Ivy

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

import java.util.Objects;

import com.google.common.base.Preconditions;

import com.enonic.xp.annotation.PublicApi;

@PublicApi
public final class ContentVersionId
{
    private final String value;

    private ContentVersionId( final String value )
    {
        Preconditions.checkNotNull( value );
        this.value = value;
    }

    @Override
    public boolean equals( final Object o )
    {
        return ( o instanceof ContentVersionId ) && Objects.equals( this.value, ( (ContentVersionId) o ).value );
    }

    @Override
    public int hashCode()
    {
        return this.value.hashCode();
    }

    @Override
    public String toString()
    {
        return this.value;
    }

    public static ContentVersionId from( final String id )
    {
        return new ContentVersionId( id );
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy