Class PackageDependency
java.lang.Object
nl.talsmasoftware.umldoclet.javadoc.dependencies.PackageDependency
Package dependency.
Contains a 'from' package and a 'to' package. A (from) package has a dependency on a (to) package if there is at least one element in the 'from' package that needs at least one element in the 'to' package.
This class overrides equals
and hashCode
methods so unique package dependencies
can easily be included in hashed collections.
- Author:
- Sjoerd Talsma
-
Field Summary
-
Constructor Summary
ConstructorDescriptionPackageDependency
(String fromPackage, String toPackage) Create a new package dependency object. -
Method Summary
-
Field Details
-
fromPackage
The qualified name of the depending package. This package contains at least one element that has a dependency on an element in thetoPackage
. -
toPackage
The qualified name of the depended-upon package. This package contains at least one element that is needed by an element in thefromPackage
.
-
-
Constructor Details
-
PackageDependency
Create a new package dependency object.- Parameters:
fromPackage
- The package that has a dependency on another package.toPackage
- The package that is depended upon.
-
-
Method Details
-
hashCode
public int hashCode()- Overrides:
hashCode
in classObject
- Returns:
- Hashcode implementation based on the
fromPackage
andtoPackage
values.
-
equals
Equal implementation based on thefromPackage
andtoPackage
values.- Overrides:
equals
in classObject
- Parameters:
other
- The other object to compare with.- Returns:
true
if the other object is also aPackageDependency
and contains the samefromPackage
andtoPackage
values,false
otherwise.
-
toString
-