Clover coverage report - Convert - proto0
Coverage timestamp: Mo Nov 22 2004 13:19:16 CET
file stats: LOC: 60   Methods: 6
NCLOC: 33   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
ConverterEdge.java 50% 78,9% 100% 75,8%
coverage coverage
 1    /*
 2    * Copyright 2004 Ronald Blaschke.
 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    package org.rblasch.convert;
 17   
 18    import org.rblasch.convert.graph.WeightedDirectedEdge;
 19   
 20    public final class ConverterEdge implements WeightedDirectedEdge {
 21    private final MetaConverter converter;
 22    private final int weight;
 23   
 24  1769 public ConverterEdge(final MetaConverter converter, final int weight) {
 25  1769 this.converter = converter;
 26  1769 this.weight = weight;
 27    }
 28   
 29  1090 public MetaConverter getConverter() {
 30  1090 return converter;
 31    }
 32   
 33  11204 public int getWeight() {
 34  11204 return weight;
 35    }
 36   
 37  9097 public String toString() {
 38  9097 return "-(" + weight + ")->";
 39    }
 40   
 41   
 42    // generated
 43  1282 public boolean equals(final Object o) {
 44  0 if (this == o) return true;
 45  0 if (!(o instanceof ConverterEdge)) return false;
 46   
 47  1282 final ConverterEdge converterEdge = (ConverterEdge) o;
 48  0 if (weight != converterEdge.weight) return false;
 49  0 if (!converter.equals(converterEdge.converter)) return false;
 50   
 51  1282 return true;
 52    }
 53   
 54  18256 public int hashCode() {
 55  18256 int result;
 56  18256 result = converter.hashCode();
 57  18256 result = 29 * result + weight;
 58  18256 return result;
 59    }
 60    }