Coverage Report - com.timjohnstondev.unitconverter.model.Conversion
 
Classes in this File Line Coverage Branch Coverage Complexity
Conversion
N/A
N/A
1
 
 1  
 /**
 2  
  * Copyright 2009 Timothy Johnston Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
 3  
  * file except in compliance with the License. You may obtain a copy of the License at
 4  
  * 
 5  
  * http://www.apache.org/licenses/LICENSE-2.0
 6  
  * 
 7  
  * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
 8  
  * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
 9  
  * specific language governing permissions and limitations under the License.
 10  
  */
 11  
 
 12  
 package com.timjohnstondev.unitconverter.model;
 13  
 
 14  
 /**
 15  
  * A {@code Conversion} provides access to the unit symbol, html formatted symbol (used to show exponents correctly),
 16  
  * unit name and the conversion factor or formula.
 17  
  */
 18  
 public interface Conversion
 19  
 {
 20  
   /**
 21  
    * Returns this {@code Conversion}'s factor or formula used to convert from one set of units to another.
 22  
    * 
 23  
    * @return this {@code Conversion}'s factor or formula to perform the conversion
 24  
    */
 25  
   String getConversion();
 26  
 
 27  
   /**
 28  
    * Returns this symbol's name in unabbreviated words for this {@link Conversion}.
 29  
    * 
 30  
    * @return the name for this symbol
 31  
    */
 32  
   String getUnitName();
 33  
 
 34  
   /**
 35  
    * Returns the raw text unit symbol for this {@link Conversion}.
 36  
    * 
 37  
    * @return the unit symbol
 38  
    */
 39  
   String getUnitSymbol();
 40  
 
 41  
   /**
 42  
    * Returns the html formatted unit symbol (used to show exponents correctly) for this {@link Conversion}.
 43  
    * 
 44  
    * @return the html formatted unit symbol
 45  
    */
 46  
   String getFormattedUnitSymbol();
 47  
 
 48  
   /**
 49  
    * Updates the unit separator symbol
 50  
    * 
 51  
    * @param symbol the new unit separator symbol
 52  
    */
 53  
   void setUnitSeparator(String symbol);
 54  
 }