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
Fields -
Constructor Summary
ConstructorsConstructorDescriptionPackageDependency(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:
hashCodein classObject- Returns:
- Hashcode implementation based on the
fromPackageandtoPackagevalues.
-
equals
Equal implementation based on thefromPackageandtoPackagevalues.- Overrides:
equalsin classObject- Parameters:
other- The other object to compare with.- Returns:
trueif the other object is also aPackageDependencyand contains the samefromPackageandtoPackagevalues,falseotherwise.
-
toString
-