Record Class Comment
java.lang.Object
java.lang.Record
net.tangly.core.Comment
- Record Components:
created- timestamp when the comment was created- of the comment instance as human-readable fieldtext- text of the comment, we recommend using asciidoc format- set of tags associated with the comment
- All Implemented Interfaces:
HasTags
public record Comment(LocalDateTime created, String author, String text, Set<Tag> tags)
extends Record
implements HasTags
Defines a human-readable annotation to an entity. A comment is an immutable object. Comments can be tagged to provide classification. A comment belongs to
the entity owning it an is only accessible through this entity.
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionComment(@NotNull LocalDateTime created, @NotNull String author, @NotNull String text) Default constructor to create an immutable instance.Creates an instance of aCommentrecord class. -
Method Summary
Modifier and TypeMethodDescriptionauthor()Returns the value of theauthorrecord component.created()Returns the value of thecreatedrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.static Commenttags()Returns the value of thetagsrecord component.text()Returns the value of thetextrecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.tangly.core.HasTags
containsTag, containsTag, findBy, findBy, findByNamespace, rawTags, value, value
-
Constructor Details
-
Comment
public Comment(@NotNull @NotNull LocalDateTime created, @NotNull @NotNull String author, @NotNull @NotNull String text) Default constructor to create an immutable instance.- Parameters:
created- timestamp when the comment was createdauthor- of the comment instance as human-readable fieldtext- text of the comment, we recommend using asciidoc format
-
Comment
Creates an instance of aCommentrecord class.
-
-
Method Details
-
of
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
created
-
author
-
text
-
tags
-