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

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

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

public class RoutableNodeVersionId
{
    private final NodeId nodeId;

    private final NodeVersionId nodeVersionId;

    private RoutableNodeVersionId( final Builder builder )
    {
        nodeId = builder.nodeId;
        nodeVersionId = builder.nodeVersionId;
    }

    public NodeId getNodeId()
    {
        return nodeId;
    }

    public NodeVersionId getNodeVersionId()
    {
        return nodeVersionId;
    }

    public static RoutableNodeVersionId from( NodeId nodeId, NodeVersionId nodeVersionId )
    {
        return create().nodeId( nodeId ).
            nodeVersionId( nodeVersionId ).
            build();
    }

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

    public static final class Builder
    {
        private NodeId nodeId;

        private NodeVersionId nodeVersionId;

        private Builder()
        {
        }

        public Builder nodeId( final NodeId nodeId )
        {
            this.nodeId = nodeId;
            return this;
        }

        public Builder nodeVersionId( final NodeVersionId nodeVersionId )
        {
            this.nodeVersionId = nodeVersionId;
            return this;
        }

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy