org.jickr
Class Comment

java.lang.Object
  extended by org.jickr.Comment

public class Comment
extends java.lang.Object

A Comment, attached to either a PhotoSet or a Photo. This object is created by the getComments call from either Photo or Photoset

See Also:
Photo.getComments(), PhotoSet.getComments()

Method Summary
 void delete()
          Delete this comment from Flickr.
 boolean equals(java.lang.Object o)
          Check if this comment is equal to the one supplied.
 User getAuthor()
          Get the author of the comment.
 java.lang.String getID()
          Get the ID for this Comment
 java.lang.String getPermalink()
          Get the permanent link that leads to this comment.
 java.lang.String getText()
          Get the text associated with the comment.
 int hashCode()
          Return the HashCode of this Comment, based on ID.
 void updateText(java.lang.String commentText)
          Change the text of this comment to the supplied text.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getID

public java.lang.String getID()
Get the ID for this Comment

Returns:
Comment ID for this Comment.

getAuthor

public User getAuthor()
Get the author of the comment.

Returns:
The User who is listed as the author of the Comment.

getPermalink

public java.lang.String getPermalink()
Get the permanent link that leads to this comment.

Returns:
A string representation of the URL leading to this comment on Flickr.

getText

public java.lang.String getText()
Get the text associated with the comment.

Returns:
The content of this Comment.

updateText

public void updateText(java.lang.String commentText)
                throws FlickrException
Change the text of this comment to the supplied text.

Parameters:
commentText - New text that this comment should contain.
Throws:
FlickrException - in the event of any error.

delete

public void delete()
            throws FlickrException
Delete this comment from Flickr. After deletion, no more operations may be performed on this object.

Throws:
FlickrException - On the event of any error.

equals

public boolean equals(java.lang.Object o)
Check if this comment is equal to the one supplied. Uses ID for comparison purposes.

Overrides:
equals in class java.lang.Object
Parameters:
o - Object to compare.
Returns:
True if equal, false if not.

hashCode

public int hashCode()
Return the HashCode of this Comment, based on ID.

Overrides:
hashCode in class java.lang.Object
Returns:
int value representing a fairly unique hashcode.