Coverage Report - org.dishevelled.graph.io.ygraphml.PolyLineEdge
 
Classes in this File Line Coverage Branch Coverage Complexity
PolyLineEdge
100%
18/18
100%
8/8
2.6
 
 1  
 /*
 2  
 
 3  
     dsh-graph-io  Directed graph readers and writers.
 4  
     Copyright (c) 2008-2013 held jointly by the individual authors.
 5  
 
 6  
     This library is free software; you can redistribute it and/or modify it
 7  
     under the terms of the GNU Lesser General Public License as published
 8  
     by the Free Software Foundation; either version 3 of the License, or (at
 9  
     your option) any later version.
 10  
 
 11  
     This library is distributed in the hope that it will be useful, but WITHOUT
 12  
     ANY WARRANTY; with out even the implied warranty of MERCHANTABILITY or
 13  
     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
 14  
     License for more details.
 15  
 
 16  
     You should have received a copy of the GNU Lesser General Public License
 17  
     along with this library;  if not, write to the Free Software Foundation,
 18  
     Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA.
 19  
 
 20  
     > http://www.fsf.org/licensing/licenses/lgpl.html
 21  
     > http://www.opensource.org/licenses/lgpl-license.php
 22  
 
 23  
 */
 24  
 package org.dishevelled.graph.io.ygraphml;
 25  
 
 26  
 /**
 27  
  * Poly line edge.
 28  
  *
 29  
  * @author  Michael Heuer
 30  
  * @version $Revision$ $Date$
 31  
  */
 32  
 public final class PolyLineEdge
 33  
 {
 34  
     /** Line style for this poly line edge. */
 35  
     private final LineStyle lineStyle;
 36  
 
 37  
     /** Arrows for this poly line edge. */
 38  
     private final Arrows arrows;
 39  
 
 40  
     /** Edge label for this poly line edge. */
 41  
     private final EdgeLabel edgeLabel;
 42  
 
 43  
     /** Bend style for this poly line edge. */
 44  
     private final BendStyle bendStyle;
 45  
 
 46  
 
 47  
     /**
 48  
      * Create a new poly line edge from the specified parameters.
 49  
      *
 50  
      * @param lineStyle line style for this poly line edge, must not be null
 51  
      * @param arrows arrows for this poly line edge, must not be null
 52  
      * @param edgeLabel edge label for this poly line edge, must not be null
 53  
      * @param bendStyle bend style for this poly line edge, must not be null
 54  
      */
 55  
     public PolyLineEdge(final LineStyle lineStyle,
 56  
                         final Arrows arrows,
 57  
                         final EdgeLabel edgeLabel,
 58  
                         final BendStyle bendStyle)
 59  114
     {
 60  114
         if (lineStyle == null)
 61  
         {
 62  1
             throw new IllegalArgumentException("lineStyle must not be null");
 63  
         }
 64  113
         if (arrows == null)
 65  
         {
 66  1
             throw new IllegalArgumentException("arrows must not be null");
 67  
         }
 68  112
         if (edgeLabel == null)
 69  
         {
 70  1
             throw new IllegalArgumentException("edgeLabel must not be null");
 71  
         }
 72  111
         if (bendStyle == null)
 73  
         {
 74  1
             throw new IllegalArgumentException("bendStyle must not be null");
 75  
         }
 76  110
         this.lineStyle = lineStyle;
 77  110
         this.arrows = arrows;
 78  110
         this.edgeLabel = edgeLabel;
 79  110
         this.bendStyle = bendStyle;
 80  110
     }
 81  
 
 82  
 
 83  
     /**
 84  
      * Return the line style for this poly line edge.
 85  
      * The line style will not be null.
 86  
      *
 87  
      * @return the line style for this poly line edge
 88  
      */
 89  
     public LineStyle getLineStyle()
 90  
     {
 91  45
         return lineStyle;
 92  
     }
 93  
 
 94  
     /**
 95  
      * Return the arrows for this poly line edge.
 96  
      * The arrows will not be null.
 97  
      *
 98  
      * @return the arrows for this poly line edge
 99  
      */
 100  
     public Arrows getArrows()
 101  
     {
 102  44
         return arrows;
 103  
     }
 104  
 
 105  
     /**
 106  
      * Return the edge label for this poly line edge.
 107  
      * The edge label will not be null.
 108  
      *
 109  
      * @return the edge label for this poly line edge
 110  
      */
 111  
     public EdgeLabel getEdgeLabel()
 112  
     {
 113  53
         return edgeLabel;
 114  
     }
 115  
 
 116  
     /**
 117  
      * Return the bend style for this poly line edge.
 118  
      * The bend style will not be null.
 119  
      *
 120  
      * @return the bend style for this poly line edge
 121  
      */
 122  
     public BendStyle getBendStyle()
 123  
     {
 124  43
         return bendStyle;
 125  
     }
 126  
 }