View Javadoc
1 package net.sf.flock.impl; 2 3 import java.net.URL; 4 import java.util.Date; 5 6 import net.sf.flock.FeedI; 7 import net.sf.flock.ItemI; 8 9 /*** 10 * @version $Revision$ 11 * @author $Author$ 12 */ 13 class Item implements ItemI { 14 15 private final FeedI origin; 16 17 private String title; 18 private String description; 19 private URL link; 20 private Date creationTime; 21 22 public Item(FeedI origin) { 23 this.origin = origin; 24 } 25 26 /*** 27 * @see net.sf.flock.ItemI#getFeed() 28 */ 29 public FeedI getOrigin() { 30 return this.origin; 31 } 32 33 /*** 34 * @see net.sf.flock.ItemI#getTitle() 35 */ 36 public String getTitle() { 37 return this.title; 38 } 39 40 public void setTitle(String title) { 41 this.title = title; 42 } 43 44 /*** 45 * @see net.sf.flock.ItemI#getDescription() 46 */ 47 public String getDescription() { 48 return this.description; 49 } 50 51 public void setDescription(String description) { 52 this.description = description; 53 } 54 55 /*** 56 * @see net.sf.flock.ItemI#getLink() 57 */ 58 public URL getLink() { 59 return this.link; 60 } 61 62 public void setLink(URL link) { 63 this.link = link; 64 } 65 66 /*** 67 * @see net.sf.flock.ItemI#getCreationTime() 68 */ 69 public Date getCreationTime() { 70 return this.creationTime; 71 } 72 73 public void setCreationTime(Date creationTime) { 74 this.creationTime = creationTime; 75 } 76 77 /*** 78 * Compare based on article title. 79 * 80 * @see java.lang.Object#equals(java.lang.Object) 81 */ 82 public boolean equals(Object obj) { 83 if (!(obj instanceof ItemI)) { 84 return false; 85 } 86 return this.getTitle().equals( ((ItemI)obj).getTitle() ); 87 } 88 89 public String toString() { 90 return "Item["+getTitle()+"]"; 91 } 92 93 }

This page was automatically generated by Maven