Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright (C) 2009 Future Invent Informationsmanagement GmbH. All rights reserved. <http://www.fuin.org/> This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library. If not, see <http://www.gnu.org/licenses/>.
 
 package org.fuin.units4j.dependency;
 
A dependency to a package.
 
 public abstract class Dependency implements ToDebugStringCapable {
 
     private final String packageName;
 
     private final Boolean includeSubPackages;

    
Constructor with name and comment.

Parameters:
packageName Full qualified name of the package - Cannot be null.
 
     public Dependency(final String packageName) {
         this(packageNametrue);
     }

    
Constructor with all possible arguments.

Parameters:
packageName Full qualified name of the package - Cannot be null.
includeSubPackages If sub package dependencies are included true else false.
 
     public Dependency(final String packageNamefinal boolean includeSubPackages) {
         super();
         Utils4J.checkNotNull("packageName"packageName);
         this. = packageName;
         this. = includeSubPackages;
     }

    
Returns the name of the package.

Returns:
Full qualified name of the package.
 
     public final String getPackageName() {
         return ;
     }

    
Does this include the sub packages?

Returns:
If sub package dependencies are included true (default) else false.
 
     public final boolean isIncludeSubPackages() {
         if ( == null) {
             return true;
         }
         return ;
     }
 
     // CHECKSTYLE:OFF Generated code
     @Override
     public final int hashCode() {
         final int prime = 31;
         int result = 1;
         result = prime * result + (( == null) ? 0 : .hashCode());
         return result;
     }
 
     @Override
     public final boolean equals(Object obj) {
         if (this == obj)
             return true;
         if (obj == null)
             return false;
         if (getClass() != obj.getClass())
             return false;
         Dependency other = (Dependencyobj;
        if ( == null) {
            if (other.packageName != null)
                return false;
        } else if (!.equals(other.packageName))
            return false;
        return true;
    }
    // CHECKSTYLE:ON
New to GrepCode? Check out our FAQ X