Class Comment

java.lang.Object
org.klomp.snark.comments.Comment
All Implemented Interfaces:
Comparable<Comment>

public class Comment
extends Object
implements Comparable<Comment>
Store a single comment and/or rating. Unmodifiable except for marking as hidden. Stores a one-second timestamp but designed so identical comments within a certain time frame (bucket) are equal. Don't store in a plain set - see equals().
Since:
0.9.31
  • Field Details

  • Constructor Details

    • Comment

      public Comment​(String text, String name, int rating)
      My comment, now
      Parameters:
      text - may be null, will be truncated to max length, newlines replaced with spaces
      name - may be null, will be truncated to max length, newlines and commas removed
      rating - 0-5
    • Comment

      public Comment​(String text, String name, int rating, long time, boolean isMine)
      Parameters:
      text - may be null, will be truncated to max length, newlines replaced with spaces
      name - may be null, will be truncated to max length, newlines and commas removed
      time - java time (ms)
      rating - 0-5
  • Method Details