//# 0 errors, 158 messages
//#
/*
    //#newsfeedentry.java:1:1: class: net.sourceforge.pebble.aggregator.NewsFeedEntry
    //#newsfeedentry.java:1:1: method: net.sourceforge.pebble.aggregator.NewsFeedEntry.net.sourceforge.pebble.aggregator.NewsFeedEntry__static_init
 * Copyright (c) 2003-2006, Simon Brown
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 *   - Redistributions of source code must retain the above copyright
 *     notice, this list of conditions and the following disclaimer.
 *
 *   - Redistributions in binary form must reproduce the above copyright
 *     notice, this list of conditions and the following disclaimer in
 *     the documentation and/or other materials provided with the
 *     distribution.
 *
 *   - Neither the name of Pebble nor the names of its contributors may
 *     be used to endorse or promote products derived from this software
 *     without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
package net.sourceforge.pebble.aggregator;

import net.sourceforge.pebble.util.StringUtils;

import java.util.Date;

/**
 * @author Simon Brown
 */
public class NewsFeedEntry {

  private String link;
  private String title;
  private String body;
  private String author;
  private Date date;
  private NewsFeed feed;

  public NewsFeedEntry(String link, String title, String body, String author, Date date) {
    //#newsfeedentry.java:50: method: void net.sourceforge.pebble.aggregator.NewsFeedEntry.net.sourceforge.pebble.aggregator.NewsFeedEntry(String, String, String, String, Date)
    //#input(void net.sourceforge.pebble.aggregator.NewsFeedEntry(String, String, String, String, Date)): author
    //#input(void net.sourceforge.pebble.aggregator.NewsFeedEntry(String, String, String, String, Date)): body
    //#input(void net.sourceforge.pebble.aggregator.NewsFeedEntry(String, String, String, String, Date)): date
    //#input(void net.sourceforge.pebble.aggregator.NewsFeedEntry(String, String, String, String, Date)): link
    //#input(void net.sourceforge.pebble.aggregator.NewsFeedEntry(String, String, String, String, Date)): this
    //#input(void net.sourceforge.pebble.aggregator.NewsFeedEntry(String, String, String, String, Date)): title
    //#output(void net.sourceforge.pebble.aggregator.NewsFeedEntry(String, String, String, String, Date)): this.author
    //#output(void net.sourceforge.pebble.aggregator.NewsFeedEntry(String, String, String, String, Date)): this.body
    //#output(void net.sourceforge.pebble.aggregator.NewsFeedEntry(String, String, String, String, Date)): this.date
    //#output(void net.sourceforge.pebble.aggregator.NewsFeedEntry(String, String, String, String, Date)): this.link
    //#output(void net.sourceforge.pebble.aggregator.NewsFeedEntry(String, String, String, String, Date)): this.title
    //#post(void net.sourceforge.pebble.aggregator.NewsFeedEntry(String, String, String, String, Date)): this.author == author
    //#post(void net.sourceforge.pebble.aggregator.NewsFeedEntry(String, String, String, String, Date)): init'ed(this.author)
    //#post(void net.sourceforge.pebble.aggregator.NewsFeedEntry(String, String, String, String, Date)): this.body == body
    //#post(void net.sourceforge.pebble.aggregator.NewsFeedEntry(String, String, String, String, Date)): init'ed(this.body)
    //#post(void net.sourceforge.pebble.aggregator.NewsFeedEntry(String, String, String, String, Date)): this.date == date
    //#post(void net.sourceforge.pebble.aggregator.NewsFeedEntry(String, String, String, String, Date)): init'ed(this.date)
    //#post(void net.sourceforge.pebble.aggregator.NewsFeedEntry(String, String, String, String, Date)): this.link == link
    //#post(void net.sourceforge.pebble.aggregator.NewsFeedEntry(String, String, String, String, Date)): init'ed(this.link)
    //#post(void net.sourceforge.pebble.aggregator.NewsFeedEntry(String, String, String, String, Date)): this.title == title
    //#post(void net.sourceforge.pebble.aggregator.NewsFeedEntry(String, String, String, String, Date)): init'ed(this.title)
    this.link = link;
    this.title = title;
    this.body = body;
    this.author = author;
    this.date = date;
  }
    //#newsfeedentry.java:56: end of method: void net.sourceforge.pebble.aggregator.NewsFeedEntry.net.sourceforge.pebble.aggregator.NewsFeedEntry(String, String, String, String, Date)

  void setFeed(NewsFeed feed) {
    this.feed = feed;
    //#newsfeedentry.java:59: method: void net.sourceforge.pebble.aggregator.NewsFeedEntry.setFeed(NewsFeed)
    //#input(void setFeed(NewsFeed)): feed
    //#input(void setFeed(NewsFeed)): this
    //#output(void setFeed(NewsFeed)): this.feed
    //#post(void setFeed(NewsFeed)): this.feed == feed
    //#post(void setFeed(NewsFeed)): init'ed(this.feed)
  }
    //#newsfeedentry.java:60: end of method: void net.sourceforge.pebble.aggregator.NewsFeedEntry.setFeed(NewsFeed)

  public NewsFeed getFeed() {
    return feed;
    //#newsfeedentry.java:63: method: NewsFeed net.sourceforge.pebble.aggregator.NewsFeedEntry.getFeed()
    //#input(NewsFeed getFeed()): this
    //#input(NewsFeed getFeed()): this.feed
    //#output(NewsFeed getFeed()): return_value
    //#pre[2] (NewsFeed getFeed()): init'ed(this.feed)
    //#post(NewsFeed getFeed()): return_value == this.feed
    //#post(NewsFeed getFeed()): init'ed(return_value)
    //#newsfeedentry.java:63: end of method: NewsFeed net.sourceforge.pebble.aggregator.NewsFeedEntry.getFeed()
  }

  public String getLink() {
    return link;
    //#newsfeedentry.java:67: method: String net.sourceforge.pebble.aggregator.NewsFeedEntry.getLink()
    //#input(String getLink()): this
    //#input(String getLink()): this.link
    //#output(String getLink()): return_value
    //#pre[2] (String getLink()): init'ed(this.link)
    //#post(String getLink()): return_value == this.link
    //#post(String getLink()): init'ed(return_value)
    //#newsfeedentry.java:67: end of method: String net.sourceforge.pebble.aggregator.NewsFeedEntry.getLink()
  }

  public String getTitle() {
    return title;
    //#newsfeedentry.java:71: method: String net.sourceforge.pebble.aggregator.NewsFeedEntry.getTitle()
    //#input(String getTitle()): this
    //#input(String getTitle()): this.title
    //#output(String getTitle()): return_value
    //#pre[2] (String getTitle()): init'ed(this.title)
    //#post(String getTitle()): return_value == this.title
    //#post(String getTitle()): init'ed(return_value)
    //#newsfeedentry.java:71: end of method: String net.sourceforge.pebble.aggregator.NewsFeedEntry.getTitle()
  }

  public String getBody() {
    return body;
    //#newsfeedentry.java:75: method: String net.sourceforge.pebble.aggregator.NewsFeedEntry.getBody()
    //#input(String getBody()): this
    //#input(String getBody()): this.body
    //#output(String getBody()): return_value
    //#pre[2] (String getBody()): init'ed(this.body)
    //#post(String getBody()): return_value == this.body
    //#post(String getBody()): init'ed(return_value)
    //#newsfeedentry.java:75: end of method: String net.sourceforge.pebble.aggregator.NewsFeedEntry.getBody()
  }

  public String getTruncatedBody() {
    return StringUtils.truncate(getBody());
    //#newsfeedentry.java:79: method: String net.sourceforge.pebble.aggregator.NewsFeedEntry.getTruncatedBody()
    //#newsfeedentry.java:79: Warning: method not available
    //#    -- call on String net.sourceforge.pebble.util.StringUtils:truncate(String)
    //#    severity: INFORMATIONAL
    //#    class: net.sourceforge.pebble.aggregator.NewsFeedEntry
    //#    method: String getTruncatedBody()
    //#    unanalyzed callee: String net.sourceforge.pebble.util.StringUtils:truncate(String)
    //#input(String getTruncatedBody()): __Descendant_Table[net/sourceforge/pebble/aggregator/NewsFeedEntry]
    //#input(String getTruncatedBody()): __Descendant_Table[others]
    //#input(String getTruncatedBody()): __Dispatch_Table.getBody()Ljava/lang/String;
    //#input(String getTruncatedBody()): this
    //#input(String getTruncatedBody()): this.__Tag
    //#input(String getTruncatedBody()): this.body
    //#output(String getTruncatedBody()): return_value
    //#pre[2] (String getTruncatedBody()): this.__Tag == net/sourceforge/pebble/aggregator/NewsFeedEntry
    //#pre[3] (String getTruncatedBody()): init'ed(this.body)
    //#post(String getTruncatedBody()): init'ed(return_value)
    //#newsfeedentry.java:79: end of method: String net.sourceforge.pebble.aggregator.NewsFeedEntry.getTruncatedBody()
  }

  public String getAuthor() {
    return author;
    //#newsfeedentry.java:83: method: String net.sourceforge.pebble.aggregator.NewsFeedEntry.getAuthor()
    //#input(String getAuthor()): this
    //#input(String getAuthor()): this.author
    //#output(String getAuthor()): return_value
    //#pre[2] (String getAuthor()): init'ed(this.author)
    //#post(String getAuthor()): return_value == this.author
    //#post(String getAuthor()): init'ed(return_value)
    //#newsfeedentry.java:83: end of method: String net.sourceforge.pebble.aggregator.NewsFeedEntry.getAuthor()
  }

  public Date getDate() {
    return this.date;
    //#newsfeedentry.java:87: method: Date net.sourceforge.pebble.aggregator.NewsFeedEntry.getDate()
    //#input(Date getDate()): this
    //#input(Date getDate()): this.date
    //#output(Date getDate()): return_value
    //#pre[2] (Date getDate()): init'ed(this.date)
    //#post(Date getDate()): return_value == this.date
    //#post(Date getDate()): init'ed(return_value)
    //#newsfeedentry.java:87: end of method: Date net.sourceforge.pebble.aggregator.NewsFeedEntry.getDate()
  }

  public boolean equals(Object o) {
    if (this == o) return true;
    //#newsfeedentry.java:91: method: bool net.sourceforge.pebble.aggregator.NewsFeedEntry.equals(Object)
    //#input(bool equals(Object)): __Descendant_Table[net/sourceforge/pebble/aggregator/NewsFeedEntry]
    //#input(bool equals(Object)): __Descendant_Table[others]
    //#input(bool equals(Object)): o
    //#input(bool equals(Object)): o.__Tag
    //#input(bool equals(Object)): o.link
    //#input(bool equals(Object)): this
    //#input(bool equals(Object)): this.link
    //#output(bool equals(Object)): return_value
    //#pre[4] (bool equals(Object)): (soft) o.__Tag == net/sourceforge/pebble/aggregator/NewsFeedEntry
    //#pre[5] (bool equals(Object)): (soft) init'ed(o.link)
    //#pre[8] (bool equals(Object)): (soft) this.link != null
    //#post(bool equals(Object)): init'ed(return_value)
    //#test_vector(bool equals(Object)): o: Inverse{null}, Addr_Set{null}
    //#test_vector(bool equals(Object)): this == o: {0}, {1}
    //#test_vector(bool equals(Object)): java.lang.String:equals(...)@96: {1}, {0}
    if (o == null || getClass() != o.getClass()) return false;

    NewsFeedEntry feedEntry = (NewsFeedEntry) o;

    if (!link.equals(feedEntry.link)) return false;

    return true;
    //#newsfeedentry.java:98: end of method: bool net.sourceforge.pebble.aggregator.NewsFeedEntry.equals(Object)
  }

  public int hashCode() {
    return link.hashCode();
    //#newsfeedentry.java:102: method: int net.sourceforge.pebble.aggregator.NewsFeedEntry.hashCode()
    //#input(int hashCode()): this
    //#input(int hashCode()): this.link
    //#output(int hashCode()): return_value
    //#pre[2] (int hashCode()): this.link != null
    //#post(int hashCode()): init'ed(return_value)
    //#newsfeedentry.java:102: end of method: int net.sourceforge.pebble.aggregator.NewsFeedEntry.hashCode()
  }

  public String toString() {
    return "title=" + title + " | body=" + body + " | author=" + author + " | date=" + date + " | link=" + link;
    //#newsfeedentry.java:106: method: String net.sourceforge.pebble.aggregator.NewsFeedEntry.toString()
    //#input(String toString()): this
    //#input(String toString()): this.author
    //#input(String toString()): this.body
    //#input(String toString()): this.date
    //#input(String toString()): this.link
    //#input(String toString()): this.title
    //#output(String toString()): return_value
    //#pre[2] (String toString()): init'ed(this.author)
    //#pre[3] (String toString()): init'ed(this.body)
    //#pre[4] (String toString()): init'ed(this.date)
    //#pre[5] (String toString()): init'ed(this.link)
    //#pre[6] (String toString()): init'ed(this.title)
    //#post(String toString()): return_value != null
    //#newsfeedentry.java:106: end of method: String net.sourceforge.pebble.aggregator.NewsFeedEntry.toString()
  }

}
    //#output(net.sourceforge.pebble.aggregator.NewsFeedEntry__static_init): __Descendant_Table[net/sourceforge/pebble/aggregator/NewsFeedEntry]
    //#output(net.sourceforge.pebble.aggregator.NewsFeedEntry__static_init): __Dispatch_Table.equals(Ljava/lang/Object;)Z
    //#output(net.sourceforge.pebble.aggregator.NewsFeedEntry__static_init): __Dispatch_Table.getAuthor()Ljava/lang/String;
    //#output(net.sourceforge.pebble.aggregator.NewsFeedEntry__static_init): __Dispatch_Table.getBody()Ljava/lang/String;
    //#output(net.sourceforge.pebble.aggregator.NewsFeedEntry__static_init): __Dispatch_Table.getDate()Ljava/util/Date;
    //#output(net.sourceforge.pebble.aggregator.NewsFeedEntry__static_init): __Dispatch_Table.getFeed()Lnet/sourceforge/pebble/aggregator/NewsFeed;
    //#output(net.sourceforge.pebble.aggregator.NewsFeedEntry__static_init): __Dispatch_Table.getLink()Ljava/lang/String;
    //#output(net.sourceforge.pebble.aggregator.NewsFeedEntry__static_init): __Dispatch_Table.getTitle()Ljava/lang/String;
    //#output(net.sourceforge.pebble.aggregator.NewsFeedEntry__static_init): __Dispatch_Table.getTruncatedBody()Ljava/lang/String;
    //#output(net.sourceforge.pebble.aggregator.NewsFeedEntry__static_init): __Dispatch_Table.hashCode()I
    //#output(net.sourceforge.pebble.aggregator.NewsFeedEntry__static_init): __Dispatch_Table.setFeed(Lnet/sourceforge/pebble/aggregator/NewsFeed;)V
    //#output(net.sourceforge.pebble.aggregator.NewsFeedEntry__static_init): __Dispatch_Table.toString()Ljava/lang/String;
    //#post(net.sourceforge.pebble.aggregator.NewsFeedEntry__static_init): __Descendant_Table[net/sourceforge/pebble/aggregator/NewsFeedEntry] == &__Dispatch_Table
    //#post(net.sourceforge.pebble.aggregator.NewsFeedEntry__static_init): __Dispatch_Table.equals(Ljava/lang/Object;)Z == &equals
    //#post(net.sourceforge.pebble.aggregator.NewsFeedEntry__static_init): __Dispatch_Table.getAuthor()Ljava/lang/String; == &getAuthor
    //#post(net.sourceforge.pebble.aggregator.NewsFeedEntry__static_init): __Dispatch_Table.getBody()Ljava/lang/String; == &getBody
    //#post(net.sourceforge.pebble.aggregator.NewsFeedEntry__static_init): __Dispatch_Table.getDate()Ljava/util/Date; == &getDate
    //#post(net.sourceforge.pebble.aggregator.NewsFeedEntry__static_init): __Dispatch_Table.getFeed()Lnet/sourceforge/pebble/aggregator/NewsFeed; == &getFeed
    //#post(net.sourceforge.pebble.aggregator.NewsFeedEntry__static_init): __Dispatch_Table.getLink()Ljava/lang/String; == &getLink
    //#post(net.sourceforge.pebble.aggregator.NewsFeedEntry__static_init): __Dispatch_Table.getTitle()Ljava/lang/String; == &getTitle
    //#post(net.sourceforge.pebble.aggregator.NewsFeedEntry__static_init): __Dispatch_Table.getTruncatedBody()Ljava/lang/String; == &getTruncatedBody
    //#post(net.sourceforge.pebble.aggregator.NewsFeedEntry__static_init): __Dispatch_Table.hashCode()I == &hashCode
    //#post(net.sourceforge.pebble.aggregator.NewsFeedEntry__static_init): __Dispatch_Table.setFeed(Lnet/sourceforge/pebble/aggregator/NewsFeed;)V == &setFeed
    //#post(net.sourceforge.pebble.aggregator.NewsFeedEntry__static_init): __Dispatch_Table.toString()Ljava/lang/String; == &toString
    //#newsfeedentry.java:: end of method: net.sourceforge.pebble.aggregator.NewsFeedEntry.net.sourceforge.pebble.aggregator.NewsFeedEntry__static_init
    //#newsfeedentry.java:: end of class: net.sourceforge.pebble.aggregator.NewsFeedEntry
