Coverage Report - org.jtheque.films.services.impl.utils.file.jt.JTFEFile
 
Classes in this File Line Coverage Branch Coverage Complexity
JTFEFile
0 %
0/10
0 %
0/6
1.667
 
 1  
 package org.jtheque.films.services.impl.utils.file.jt;
 2  
 
 3  
 /*
 4  
  * This file is part of JTheque.
 5  
  *
 6  
  * JTheque is free software: you can redistribute it and/or modify
 7  
  * it under the terms of the GNU General Public License as published by
 8  
  * the Free Software Foundation, either version 3 of the License.
 9  
  *
 10  
  * JTheque is distributed in the hope that it will be useful,
 11  
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
 12  
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 13  
  * GNU General Public License for more details.
 14  
  *
 15  
  * You should have received a copy of the GNU General Public License
 16  
  * along with JTheque.  If not, see <http://www.gnu.org/licenses/>.
 17  
  */
 18  
 
 19  
 import org.jtheque.core.utils.file.jt.able.JTZippedFile;
 20  
 
 21  
 import java.util.ArrayList;
 22  
 import java.util.Collection;
 23  
 
 24  
 /**
 25  
  * A JTFE File.
 26  
  *
 27  
  * @author Baptiste Wicht
 28  
  */
 29  0
 public final class JTFEFile implements JTZippedFile {
 30  
     private Collection<JTFFile> files;
 31  
 
 32  
     @Override
 33  
     public boolean isValid() {
 34  0
         boolean valid = !files.isEmpty();
 35  
 
 36  0
         for (JTFFile f : files) {
 37  0
             if (!f.isValid()) {
 38  0
                 valid = false;
 39  0
                 break;
 40  
             }
 41  
         }
 42  
 
 43  0
         return valid;
 44  
     }
 45  
 
 46  
     /**
 47  
      * Return the files.
 48  
      *
 49  
      * @return The files.
 50  
      */
 51  
     public Iterable<JTFFile> getFiles() {
 52  0
         return files;
 53  
     }
 54  
 
 55  
     /**
 56  
      * Set the files.
 57  
      *
 58  
      * @param files The files.
 59  
      */
 60  
     public void setFiles(Collection<JTFFile> files) {
 61  0
         this.files = new ArrayList<JTFFile>(files);
 62  0
     }
 63  
 }