ArrayList<Review> Combine_Reviews_By_Title(ArrayList<Review> Reviews)
{
String title = Reviews.get(0).Review_Title;
ArrayList<Review> ReturenedReviews = new ArrayList<Review>();
Review r = new Review();
int size= Reviews.size();
ArrayList<Product_Feature> Features = new ArrayList<Product_Feature>();
for (int i = 0; i < size; i++) {
if(Reviews.get(i).Review_Title.equals(title))
{
r.Review_Sentences.add(Reviews.get(i).getDataBody());
Features = new ArrayList<Product_Feature>();
for(Product_Feature f : ((ArrayList<Product_Feature>)Reviews.get(i).Features) )
{
Features.add(f);
}
r.Sentences_Features.add(Features);
}
else
{
r.Review_Title = title;
if(!r.Review_Sentences.isEmpty() )
ReturenedReviews.add(r);
r = new Review();
title = Reviews.get(i).Review_Title;
r.Review_Sentences.add(Reviews.get(i).getDataBody());
Features = new ArrayList<Product_Feature>();
for(Product_Feature f : ((ArrayList<Product_Feature>)Reviews.get(i).Features) )
{