package innovimax.mixthem.operation;

import java.util.EnumSet;

public class LineResult {
    
    private final EnumSet<ResultType> types = EnumSet.noneOf(ResultType.class);
    private String result;

    void setResult(String result) {
        this.result = result;        
        this.types.add(result == null ? ResultType._IGNORE_RESULT : ResultType._GET_RESULT);        
    }

    String getResult() {
        return this.result;
    }

    void preserveFirst() {
        this.types.add(ResultType._READ_LAST);        
    }

    boolean readFirst() {
        return this.types.contains(ResultType._READ_FIRST);        
    }

    void preserveLast() {
        this.types.add(ResultType._READ_FIRST);        
    }

    boolean readLast() {
        return this.types.contains(ResultType._READ_LAST);        
    }

    void exploreBoth() {
        this.types.add(ResultType._READ_BOTH);        
    }   

    boolean readBoth() {
        return this.types.contains(ResultType._READ_BOTH);        
    } 

}

@@ -58,16 +58,123 @@
 umSet;%0A%0A
+/**%0A* %3Cp%3EDescribes the result of an line operation on two files.%3C/p%3E%0A* @author Innovimax%0A* @version 1.0%0A*/%0A
 public c
@@ -304,16 +304,83 @@
 esult;%0A%0A
+    /**%0A    * Set the result of the operation (maybe null).%0A    */%0A
     void
@@ -549,24 +549,95 @@
     %0A    %7D%0A%0A
+    /**%0A    * Returns the result of the operation (maybe null).%0A    */%0A
     String g
@@ -676,32 +676,87 @@
 .result;%0A    %7D%0A%0A
+    /**%0A    * Preserves first file from reading%0A    */%0A
     void preserv
@@ -820,32 +820,78 @@
         %0A    %7D%0A%0A
+    /**%0A    * Has to read first file ?%0A    */%0A
     boolean read
@@ -967,32 +967,86 @@
         %0A    %7D%0A%0A
+    /**%0A    * Preserves last file from reading%0A    */%0A
     void preserv
@@ -1114,24 +1114,69 @@
     %0A    %7D%0A%0A
+    /**%0A    * Has to read last file ?%0A    */%0A
     boolean 
@@ -1258,24 +1258,82 @@
     %0A    %7D%0A%0A
+    /**%0A    * Explores both files for next reading%0A    */%0A
     void exp
@@ -1410,16 +1410,62 @@
   %7D   %0A%0A
+    /**%0A    * Has to read both files ?%0A    */%0A
     bool

Update LineResult.java