package com.health.input;

import java.util.List;

import com.health.Record;
import com.health.Table;

<<<<<<< HEAD
/**
 * A class for functions with can be called on all input formats.
 *
 */
=======
>>>>>>> made a special class for input functions as ignore last
public class InputFunctions {

  /**
   * Deletes the last x lines which are not needed as specified by the user.
   * 
   * @param table
   *          Gets the table with the redundant lines.
   * @param config
   *          Gets the InputDescriptor which is used to create the original file.
   * @return the new table with deleted lines.
   */
  public static Table deleteLastLines(final Table table, final InputDescriptor config) {

    int deletions = config.getIgnoreLast();
    int size = table.size();
    List<Record> tab = table.getRecords();
    while (deletions > 0) {
      table.removeRecord(tab.get(size));
      size--;
      deletions--;
    }
    return table;
  }

}

@@ -100,21 +100,8 @@
 e;%0A%0A
-%3C%3C%3C%3C%3C%3C%3C HEAD%0A
 /**%0A
@@ -170,87 +170,12 @@
 ts.%0A
- *%0A
  */%0A
-=======%0A%3E%3E%3E%3E%3E%3E%3E made a special class for input functions as ignore last%0A
 publ
@@ -205,14 +205,18 @@
  %7B%0A%0A
+  
   /**%0A
+  
    *
@@ -295,11 +295,14 @@
 %0A   
-* %0A
+  *%0A  
    *
@@ -314,25 +314,29 @@
 am table%0A   
+ 
-*
+ *  
           Ge
@@ -377,16 +377,18 @@
 nes.%0A   
+  
 * @param
@@ -398,17 +398,21 @@
 nfig%0A   
+ 
-*
+ *  
         
@@ -478,15 +478,35 @@
 inal
+%0A     *           
  file.%0A
+  
    *
@@ -552,14 +552,18 @@
 es.%0A
+  
    */%0A
+  
   pu
@@ -647,17 +647,20 @@
 nfig) %7B%0A
-%0A
+    
     int 
@@ -695,24 +695,28 @@
 Last();%0A    
+   
+ 
 int size = t
@@ -724,24 +724,28 @@
 ble.size();%0A
+    
     List%3CRec
@@ -771,24 +771,29 @@
 tRecords();%0A
+%0A    
     while (d
@@ -804,24 +804,30 @@
 ions %3E 0) %7B%0A
+      
       table.
@@ -865,16 +865,22 @@
     
+    
+  
 size--;%0A
     
@@ -871,24 +871,30 @@
     size--;%0A
+      
       deleti
@@ -904,18 +904,27 @@
 --;%0A    
+  
-%7D%0A
+  %7D%0A%0A    
     retu
@@ -935,13 +935,14 @@
 able;%0A  
+  
 %7D
-%0A
 %0A%7D%0A

Revert "xls Parser fix for ignore last lines"