package innovimax.mixthem.operation;

import java.util.EnumSet;
import java.util.stream.IntStream;

/**
* <p>Describes the result of an character operation on two files.</p>
* @author Innovimax
* @version 1.0
*/
public class CharResult {
    
    private final EnumSet<ResultType> types;
    private IntStream result;    
    
    /**
    * Creates a character result.    
    */
    public CharResult() {
        this.types = EnumSet.noneOf(ResultType.class);
        this.result = null;        
    }

    /**
    * Reset the result.
    */
    void reset() {        
        this.types.clear();
        this.result = null;
    }
    
    /**
    * Set the result (maybe null).
    */
    void setResult(final IntStream result) {
        this.result = result;
        if (result != null) {
            this.types.add(ResultType.HAS_RESULT);
        }
    }

    /**
    * Returns the result (maybe null).
    */
    IntStream getResult() {
        return this.result;
    }

    /**
    * Has a result ?
    */
    boolean hasResult() {
        return this.types.contains(ResultType.HAS_RESULT);     
    }

}

@@ -240,53 +240,8 @@
    %0A
-    private final EnumSet%3CResultType%3E types;%0A
     
@@ -353,25 +353,24 @@
 sult() %7B
-%0A
         
 this.typ
@@ -365,54 +365,8 @@
     
-this.types = EnumSet.noneOf(ResultType.class);
 %0A   
@@ -466,44 +466,8 @@
 () %7B
-        %0A        this.types.clear();
 %0A   
@@ -626,25 +626,24 @@
  result;
-%0A
         
 if (resu
@@ -638,90 +638,8 @@
     
-if (result != null) %7B%0A            this.types.add(ResultType.HAS_RESULT);%0A        %7D
 %0A   
@@ -845,45 +845,22 @@
 his.
-types.contains(ResultType.HAS_RESULT)
+result != null
 ;   

Update CharResult.java