Class ApplicabilityDependencyCommentLeaf
- java.lang.Object
-
- de.hsh.graja.comment.applicability.ApplicabilityDependencyCommentLeaf
-
- All Implemented Interfaces:
ApplicabilityDependency
,Applicable
,Serializable
,Cloneable
public class ApplicabilityDependencyCommentLeaf extends Object implements ApplicabilityDependency
An object D of this class defines a dependency on a given comment C. D can be transitive or non-transitive. The methodcalcApplicability(ApplicabilityFilter)
calculates the applicability that results from D. If D is transitive, then the calculated applicability includes the own applicability of C and also the dependencies of C. If D is non-transitive, then the calculated applicability includes the own applicability of C only.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ApplicabilityDependencyCommentLeaf(Content comment, boolean isTransitive)
Create
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Applicability
calcApplicability(ApplicabilityFilter filter)
Calculates the applicability that results from this dependency object D.ApplicabilityDependencyCommentLeaf
clone()
boolean
equals(Object obj)
implements the contract ofObject.equals(Object)
.Content
getComment()
int
hashCode()
implements the contract ofObject.hashCode()
.boolean
isTransitive()
String
toString()
-
-
-
Constructor Detail
-
ApplicabilityDependencyCommentLeaf
public ApplicabilityDependencyCommentLeaf(Content comment, boolean isTransitive)
Create- Parameters:
comment
- the depended on commentisTransitive
- true means transitive.
-
-
Method Detail
-
calcApplicability
public Applicability calcApplicability(ApplicabilityFilter filter)
Calculates the applicability that results from this dependency object D. If D is transitive, then the calculated applicability includes the own applicability of C and also the dependencies of C. If D is non-transitive, then the calculated applicability includes the own applicability of C only.- Specified by:
calcApplicability
in interfaceApplicable
- Parameters:
filter
- filter- Returns:
- the calculated applicability
-
getComment
public Content getComment()
- Returns:
- the depended on comment
-
isTransitive
public boolean isTransitive()
- Returns:
- whether transitive or not
-
toString
public String toString()
- Overrides:
toString
in classObject
- See Also:
Object.toString()
-
clone
public ApplicabilityDependencyCommentLeaf clone()
- Specified by:
clone
in interfaceApplicabilityDependency
- Overrides:
clone
in classObject
- Returns:
- a clone
- See Also:
ApplicabilityDependency.clone()
-
hashCode
public int hashCode()
implements the contract ofObject.hashCode()
.
-
equals
public boolean equals(Object obj)
implements the contract ofObject.equals(Object)
. In order to prevent stack overflows in cyclic dependency situations this is not an exact equals method.
-
-