package finder;

import java.util.Iterator;
import java.util.List;

// container class for the result of a search
// identifies a sequence of bytes in a file by line number and index (number of bytes from the start of the file) of a
public class SearchResult {
    private final boolean mError;
    private final List<FindEntry> mFinds;
    
    SearchResult(List<FindEntry> found,boolean error) {
        mError = error;
        mFinds = found;
    }
    
    public boolean hasError() {
        return mError;
    }
    
    public List<FindEntry> getFinds() {
        return mFinds;
    }
    
    @Override
    public boolean equals(Object other) {
        if( !(other instanceof SearchResult) ) {
            return false;
        }
        List<FindEntry> otherFinds = ((SearchResult)other).getFinds();
        if( mFinds.size() != otherFinds.size() ) {
            return false;
        }
        Iterator<FindEntry> myIt = mFinds.iterator();
        Iterator<FindEntry> otherIt = otherFinds.iterator();
        while( myIt.hasNext() ) {
            if( !myIt.next().equals(otherIt.next()) ) {
                return false;
            }
        }
        return true;
    }
}

@@ -258,42 +258,8 @@
 t %7B%0A
-    private final boolean mError;%0A
     
@@ -292,24 +292,24 @@
 ry%3E mFinds;%0A
+
     %0A    Sea
@@ -370,111 +370,21 @@
    m
-Error = error;%0A        mFinds = found;%0A    %7D%0A    %0A    public boolean hasError() %7B%0A        return mError
+Finds = found
 ;%0A  
@@ -674,24 +674,116 @@
 getFinds();%0A
+        if( (mFinds == null) %5E (otherFinds == null) ) %7B%0A            return false;%0A        %7D%0A
         if( 

remove mError field from SearchResult, fix the equals method