Coverage Report - org.jtheque.films.services.impl.utils.cover.Format
 
Classes in this File Line Coverage Branch Coverage Complexity
Format
0 %
0/7
N/A
1
 
 1  
 package org.jtheque.films.services.impl.utils.cover;
 2  
 
 3  
 import org.jtheque.core.managers.Managers;
 4  
 import org.jtheque.core.managers.language.ILanguageManager;
 5  
 
 6  
 /*
 7  
  * This file is part of JTheque.
 8  
  *
 9  
  * JTheque is free software: you can redistribute it and/or modify
 10  
  * it under the terms of the GNU General Public License as published by
 11  
  * the Free Software Foundation, either version 3 of the License.
 12  
  *
 13  
  * JTheque is distributed in the hope that it will be useful,
 14  
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
 15  
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 16  
  * GNU General Public License for more details.
 17  
  *
 18  
  * You should have received a copy of the GNU General Public License
 19  
  * along with JTheque.  If not, see <http://www.gnu.org/licenses/>.
 20  
  */
 21  
 
 22  
 /**
 23  
  * A format of cover.
 24  
  *
 25  
  * @author Baptiste Wicht
 26  
  */
 27  
 public final class Format {
 28  
     private final String key;
 29  
     private final String form;
 30  
 
 31  
     /**
 32  
      * Construct a new Format.
 33  
      *
 34  
      * @param key  The internationalization of the name of the format.
 35  
      * @param form The name of the file of the form.
 36  
      */
 37  
     public Format(String key, String form) {
 38  0
         super();
 39  
 
 40  0
         this.key = key;
 41  0
         this.form = form;
 42  0
     }
 43  
 
 44  
     /**
 45  
      * Return the name's internationalization key.
 46  
      *
 47  
      * @return the name's internationalization key.
 48  
      */
 49  
     public String getKey() {
 50  0
         return key;
 51  
     }
 52  
 
 53  
     /**
 54  
      * Return the form's file's name.
 55  
      *
 56  
      * @return the form's file's name.
 57  
      */
 58  
     public String getForm() {
 59  0
         return form;
 60  
     }
 61  
 
 62  
     @Override
 63  
     public String toString() {
 64  0
         return Managers.getManager(ILanguageManager.class).getMessage(key);
 65  
     }
 66  
 }