Advertisement
Guest User

Comment.java

a guest
Dec 22nd, 2012
29
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.12 KB | None | 0 0
  1. package reddit;
  2.  
  3. public class Comment {
  4.     public String permalink;
  5.     public String data;
  6.     public String author;
  7.     public String opid;
  8.     public String subreddit;
  9.     public String linkid;
  10.     public String title;
  11.     public String oppermalink;
  12.     public int points;
  13.    
  14.     public Comment(String permalink, String data, String author, String OP, String sub, String title, String linkid) {
  15.         super();
  16.         this.permalink = permalink;
  17.         this.data = data;
  18.         this.author = author;
  19.         this.opid = OP;
  20.         this.linkid = linkid;
  21.         this.title = title;
  22.     }
  23.     public Comment() {
  24.         // TODO Auto-generated constructor stub
  25.     }
  26.    
  27.     public String getLinkURL() {
  28.         return oppermalink + linkid;
  29.     }
  30.    
  31.     public boolean isCompleteComment() {
  32.         return permalink != null && data != null && author != null;
  33.     }
  34.     @Override
  35.     public String toString() {
  36.         return "Comment [permalink=" + permalink + ", data=" + data
  37.                 + ", author=" + author + ", opid=" + opid + ", subreddit="
  38.                 + subreddit + ", linkid=" + linkid + ", title=" + title
  39.                 + ", oppermalink=" + oppermalink + ", points=" + points
  40.                 + ", getLinkURL()=" + getLinkURL() + "]";
  41.     }
  42.    
  43.    
  44.    
  45. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement