Class ApplicabilityDependencyGroup
java.lang.Object
de.hsh.graja.comment.applicability.ApplicabilityDependencyGroup
- All Implemented Interfaces:
ApplicabilityDependency,Applicable,Serializable,Cloneable
- Direct Known Subclasses:
ApplicabilityDependencyIntersection,ApplicabilityDependencyUnion
public abstract class ApplicabilityDependencyGroup
extends Object
implements ApplicabilityDependency
Abstract base class of union or intersection set of
ApplicabilityDependency objects.- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected HashSet<ApplicabilityDependency>protected ApplicabilityReducer -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedcreate an empty setprotectedApplicabilityDependencyGroup(ApplicabilityReducer reducer, ApplicabilityDependency... dependencies) create a given setprotectedApplicabilityDependencyGroup(ApplicabilityReducer reducer, Iterable<? extends ApplicabilityDependency> dependencies) create a given set -
Method Summary
Modifier and TypeMethodDescriptionvoidadd a dependencycalcApplicability(ApplicabilityFilter filter) Calculate the applicability of a comment or for referenced comments (so called dependencies).abstract ApplicabilityDependencyGroupclone()booleanimplements the contract ofObject.equals(Object).inthashCode()implements the contract ofObject.hashCode().
-
Field Details
-
dependencies
-
reducer
-
-
Constructor Details
-
ApplicabilityDependencyGroup
protected ApplicabilityDependencyGroup(ApplicabilityReducer reducer, Iterable<? extends ApplicabilityDependency> dependencies) create a given set -
ApplicabilityDependencyGroup
protected ApplicabilityDependencyGroup(ApplicabilityReducer reducer, ApplicabilityDependency... dependencies) create a given set -
ApplicabilityDependencyGroup
create an empty set
-
-
Method Details
-
clone
- Specified by:
clonein interfaceApplicabilityDependency- Overrides:
clonein classObject- Returns:
- a clone
-
add
add a dependency- Parameters:
d- dependency
-
calcApplicability
Description copied from interface:ApplicableCalculate the applicability of a comment or for referenced comments (so called dependencies). The calculated applicability might result from a union or intersection of grouped dependencies. The calculation leaves out artifacts that do not pass the givenfilter. If no applicability can be calculated, because all relevant artifacts are filtered out,Applicability.MINIMUM_APPLICABILITYis returned.- Specified by:
calcApplicabilityin interfaceApplicable- Parameters:
filter- filter- Returns:
- the result after evaluating and reducing all depended on applicabilities.
If no depended on artifact passes the filter, the value
reducer.initial()is returned.
-
hashCode
public int hashCode()implements the contract ofObject.hashCode(). -
equals
implements the contract ofObject.equals(Object).
-