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

com.atlassian.stash.rest.client.api.entity.Comment Maven / Gradle / Ivy

The newest version!
package com.atlassian.stash.rest.client.api.entity;

import com.google.common.base.MoreObjects;

import javax.annotation.Nonnull;

/**
 * Basic representation of a comment, only few attributes for now.
 */
public class Comment implements TaskAnchor {
    private final long id;
    private final long version;
    @Nonnull
    private final String text;

    public Comment(long id, long version, @Nonnull String text) {
        this.id = id;
        this.version = version;
        this.text = text;
    }

    /**
     * @return comment id
     */
    @Override
    public long getId() {
        return id;
    }

    /**
     * @return comment version
     */
    public long getVersion() {
        return version;
    }

    /**
     * @return comment text
     */
    @Nonnull
    public String getText() {
        return text;
    }

    @Override
    public String toString() {
        return MoreObjects.toStringHelper(this)
                .add("id", id)
                .add("version", version)
                .add("text", text)
                .toString();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy