Coverage Report - net.sourceforge.jeuclid.elements.support.Dimension2DImpl
 
Classes in this File Line Coverage Branch Coverage Complexity
Dimension2DImpl
66%
6/9
N/A
1
 
 1  
 /*
 2  
  * Copyright 2002 - 2007 JEuclid, http://jeuclid.sf.net
 3  
  *
 4  
  * Licensed under the Apache License, Version 2.0 (the "License");
 5  
  * you may not use this file except in compliance with the License.
 6  
  * You may obtain a copy of the License at
 7  
  *
 8  
  *      http://www.apache.org/licenses/LICENSE-2.0
 9  
  *
 10  
  * Unless required by applicable law or agreed to in writing, software
 11  
  * distributed under the License is distributed on an "AS IS" BASIS,
 12  
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 13  
  * See the License for the specific language governing permissions and
 14  
  * limitations under the License.
 15  
  */
 16  
 
 17  
 /* $Id: Dimension2DImpl.java,v 8afef6dd0d58 2007/09/14 08:29:58 maxberger $ */
 18  
 
 19  
 package net.sourceforge.jeuclid.elements.support;
 20  
 
 21  
 import java.awt.geom.Dimension2D;
 22  
 
 23  
 /**
 24  
  * @version $Revision: 8afef6dd0d58 $
 25  
  */
 26  
 public class Dimension2DImpl extends Dimension2D {
 27  
     private float width;
 28  
 
 29  
     private float height;
 30  
 
 31  
     /**
 32  
      * Default Constructor.
 33  
      * 
 34  
      * @param w
 35  
      *            new width.
 36  
      * @param h
 37  
      *            new height.
 38  
      */
 39  28842
     public Dimension2DImpl(final float w, final float h) {
 40  28842
         this.width = w;
 41  28842
         this.height = h;
 42  28842
     }
 43  
 
 44  
     /** {@inheritDoc} */
 45  
     @Override
 46  
     public double getHeight() {
 47  57684
         return this.height;
 48  
     }
 49  
 
 50  
     /** {@inheritDoc} */
 51  
     @Override
 52  
     public double getWidth() {
 53  28842
         return this.width;
 54  
 
 55  
     }
 56  
 
 57  
     /** {@inheritDoc} */
 58  
     @Override
 59  
     public void setSize(final double w, final double h) {
 60  0
         this.width = (float) w;
 61  0
         this.height = (float) h;
 62  0
     }
 63  
 }