// Path: app/src/main/java/com/hexforhn/hex/model/Item.java
// public interface Item {
// 
//     String getId();
// 
// }
// 
// Path: app/src/main/java/com/hexforhn/hex/model/Story.java
// public class Story implements Item {
// 
//     private final String mId;
//     private final String mTitle;
//     private final String mUrl;
//     private final String mCommentsUrl;
//     private final String mUser;
//     private final String mDomain;
//     private final int mScore;
//     private final int mCommentCount;
//     private final Date mDate;
//     private final List<Comment> mComments;
// 
//     public Story(String id, String title, String url, String commentsUrl, String user, String domain,
//                  int score, int commentCount, Date date) {
//         this.mId = id;
//         this.mTitle = title;
//         this.mUrl = url;
//         this.mCommentsUrl = commentsUrl;
//         this.mUser = user;
//         this.mDomain = domain;
//         this.mScore = score;
//         this.mCommentCount = commentCount;
//         this.mDate = date;
//         this.mComments = new ArrayList<>();
//     }
// 
//     public Story(String id, String title, String url, String commentsUrl, String user, String domain,
//                  int score, int commentCount, Date date, List<Comment> comments) {
//         this.mId = id;
//         this.mTitle = title;
//         this.mUrl = url;
//         this.mCommentsUrl = commentsUrl;
//         this.mUser = user;
//         this.mDomain = domain;
//         this.mScore = score;
//         this.mCommentCount = commentCount;
//         this.mDate = date;
//         this.mComments = comments;
//     }
// 
//     public String getId() {
//         return this.mId;
//     }
// 
//     public String getTitle() {
//         return this.mTitle;
//     }
// 
//     public String getUrl() {
//         return this.mUrl;
//     }
// 
//     public String getCommentsUrl() {
//         return this.mCommentsUrl;
//     }
// 
//     public String getUser() {
//         return this.mUser;
//     }
// 
//     public String getDomain() {
//         return this.mDomain;
//     }
// 
//     public int getScore() {
//         return this.mScore;
//     }
// 
//     public int getCommentCount() {
//         return this.mCommentCount;
//     }
// 
//     public Date getDate() {
//         return this.mDate;
//     }
// 
//     public List<Comment> getComments() {
//         return this.mComments;
//     }
// }
// 
// Path: app/src/main/java/com/hexforhn/hex/viewmodel/StoryListItemViewModel.java
// public class StoryListItemViewModel {
// 
//     private final String mTitle;
//     private final String mDomain;
//     private final int mScore;
//     private final int mCommentCount;
//     private final Date mDate;
// 
//     public StoryListItemViewModel(String title, String domain, int score, int commentCount, Date date) {
//         this.mTitle = title;
//         this.mDomain = domain;
//         this.mScore = score;
//         this.mCommentCount = commentCount;
//         this.mDate = date;
//     }
// 
//     public String getTitle() {
//         return this.mTitle;
//     }
// 
//     public String getDomain() {
//         return this.mDomain;
//     }
// 
//     public String getScore() {
//         return String.valueOf(this.mScore);
//     }
// 
//     public String getCommentCount() {
//         return String.valueOf(this.mCommentCount);
//     }
// 
//     public String getRelativeTime() {
//         return DateUtils.getRelativeTimeSpanString(mDate.getTime(), System.currentTimeMillis(), 0)
//                 .toString();
// 
//     }
// }


import com.hexforhn.hex.model.Item;
import com.hexforhn.hex.model.Story;
import com.hexforhn.hex.viewmodel.StoryListItemViewModel;
import java.util.ArrayList;
import java.util.List;
package com.hexforhn.hex.viewmodel.factory;



public class StoryListItemFactory {

    public static ArrayList<StoryListItemViewModel> createItemListItems(List<? extends Item> items) {
        ArrayList<StoryListItemViewModel> itemListItems = new ArrayList<>();

        if (items == null) {
            return itemListItems;
        }

        for (Object item : items) {
// Path: app/src/main/java/com/hexforhn/hex/model/Item.java
// public interface Item {
// 
//     String getId();
// 
// }
// 
// Path: app/src/main/java/com/hexforhn/hex/model/Story.java
// public class Story implements Item {
// 
//     private final String mId;
//     private final String mTitle;
//     private final String mUrl;
//     private final String mCommentsUrl;
//     private final String mUser;
//     private final String mDomain;
//     private final int mScore;
//     private final int mCommentCount;
//     private final Date mDate;
//     private final List<Comment> mComments;
// 
//     public Story(String id, String title, String url, String commentsUrl, String user, String domain,
//                  int score, int commentCount, Date date) {
//         this.mId = id;
//         this.mTitle = title;
//         this.mUrl = url;
//         this.mCommentsUrl = commentsUrl;
//         this.mUser = user;
//         this.mDomain = domain;
//         this.mScore = score;
//         this.mCommentCount = commentCount;
//         this.mDate = date;
//         this.mComments = new ArrayList<>();
//     }
// 
//     public Story(String id, String title, String url, String commentsUrl, String user, String domain,
//                  int score, int commentCount, Date date, List<Comment> comments) {
//         this.mId = id;
//         this.mTitle = title;
//         this.mUrl = url;
//         this.mCommentsUrl = commentsUrl;
//         this.mUser = user;
//         this.mDomain = domain;
//         this.mScore = score;
//         this.mCommentCount = commentCount;
//         this.mDate = date;
//         this.mComments = comments;
//     }
// 
//     public String getId() {
//         return this.mId;
//     }
// 
//     public String getTitle() {
//         return this.mTitle;
//     }
// 
//     public String getUrl() {
//         return this.mUrl;
//     }
// 
//     public String getCommentsUrl() {
//         return this.mCommentsUrl;
//     }
// 
//     public String getUser() {
//         return this.mUser;
//     }
// 
//     public String getDomain() {
//         return this.mDomain;
//     }
// 
//     public int getScore() {
//         return this.mScore;
//     }
// 
//     public int getCommentCount() {
//         return this.mCommentCount;
//     }
// 
//     public Date getDate() {
//         return this.mDate;
//     }
// 
//     public List<Comment> getComments() {
//         return this.mComments;
//     }
// }
// 
// Path: app/src/main/java/com/hexforhn/hex/viewmodel/StoryListItemViewModel.java
// public class StoryListItemViewModel {
// 
//     private final String mTitle;
//     private final String mDomain;
//     private final int mScore;
//     private final int mCommentCount;
//     private final Date mDate;
// 
//     public StoryListItemViewModel(String title, String domain, int score, int commentCount, Date date) {
//         this.mTitle = title;
//         this.mDomain = domain;
//         this.mScore = score;
//         this.mCommentCount = commentCount;
//         this.mDate = date;
//     }
// 
//     public String getTitle() {
//         return this.mTitle;
//     }
// 
//     public String getDomain() {
//         return this.mDomain;
//     }
// 
//     public String getScore() {
//         return String.valueOf(this.mScore);
//     }
// 
//     public String getCommentCount() {
//         return String.valueOf(this.mCommentCount);
//     }
// 
//     public String getRelativeTime() {
//         return DateUtils.getRelativeTimeSpanString(mDate.getTime(), System.currentTimeMillis(), 0)
//                 .toString();
// 
//     }
// }


// Path: app/src/main/java/com/hexforhn/hex/viewmodel/factory/StoryListItemFactory.java
import com.hexforhn.hex.model.Item;
import com.hexforhn.hex.model.Story;
import com.hexforhn.hex.viewmodel.StoryListItemViewModel;
import java.util.ArrayList;
import java.util.List;

package com.hexforhn.hex.viewmodel.factory;



public class StoryListItemFactory {

    public static ArrayList<StoryListItemViewModel> createItemListItems(List<? extends Item> items) {
        ArrayList<StoryListItemViewModel> itemListItems = new ArrayList<>();

        if (items == null) {
            return itemListItems;
        }

        for (Object item : items) {
            if (item instanceof Story) {