Clover coverage report - JBind Project
Coverage timestamp: Fr Mai 28 2004 11:17:36 CEST
file stats: LOC: 63   Methods: 8
NCLOC: 40   Classes: 1
This license of Clover is provided to support the development of JBind only. Please visit http://www.thecortex.net/clover to obtain a licensed version of Clover.
 
 Source file Conditionals Statements Methods TOTAL
Ref.java 50% 100% 100% 95,8%
 1   
 /*
 2   
  * JBind
 3   
  *
 4   
  * Copyright (c) by Stefan Wachter. All rights reserved.
 5   
  *
 6   
  * Usage, modification, and redistribution is subject to license terms that are
 7   
  * available at 'http://www.jbind.org'. The JBind license is like the
 8   
  * 'Apache Software License V 1.1'.
 9   
  */
 10   
 package org.jbind.xml.base;
 11   
 
 12   
 public class Ref implements IRef {
 13   
 
 14   
   private String myNamespace = null;
 15   
   private ISymbolspace mySymbolSpace = null;
 16   
   private String myLocalPart = null;
 17   
 
 18  57875
   public Ref(String aNamespace, ISymbolspace aSymbolSpace, String aLocalPart) {
 19   
     assert null != aNamespace : "namespace must not be null";
 20   
     assert null != aSymbolSpace : "symbol space must not be null";
 21   
     assert null != aLocalPart : "local name must not be null";
 22  57875
     myNamespace = aNamespace;
 23  57875
     mySymbolSpace = aSymbolSpace;
 24  57875
     myLocalPart = aLocalPart;
 25   
   }
 26   
 
 27   
 
 28  115179
   public String getNamespace() {
 29  115179
     return myNamespace;
 30   
   }
 31   
 
 32  32143
   public ISymbolspace getSymbolSpace() {
 33  32143
     return mySymbolSpace;
 34   
   }
 35   
 
 36   
 
 37  122511
   public String getLocalPart() {
 38  122511
     return myLocalPart;
 39   
   }
 40   
 
 41   
 
 42  12348
   public boolean equals(Object anObject) {
 43  12348
     boolean res = anObject instanceof IRef;
 44  12348
     if (res) {
 45  12348
       IRef r = (IRef)anObject;
 46  12348
       res = myNamespace.equals(r.getNamespace()) && mySymbolSpace.equals(r.getSymbolSpace()) && myLocalPart.equals(r.getLocalPart());
 47   
     }
 48  12348
     return res;
 49   
   }
 50   
 
 51  27329
   public int hashCode() {
 52  27329
     return myNamespace.hashCode() + mySymbolSpace.hashCode() + myLocalPart.hashCode();
 53   
   }
 54   
 
 55  172
   public String toString() {
 56  172
     return getNamespace() + ":" + getSymbolSpace() + ":" + getLocalPart();
 57   
   }
 58   
 
 59  82
   public String asStringKey() {
 60  82
     return toString();
 61   
   }
 62   
 }
 63