Class ApplicabilitySpec
java.lang.Object
de.hsh.graja.comment.applicability.ApplicabilitySpec
- All Implemented Interfaces:
IncludeSpec
,Serializable
An instance of this class specifies a comment's own
Applicability
together with the
applicabilities of depended on comments (ApplicabilityDependency
).
Once created, the dependencies cannot be modified.- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ApplicabilitySpec
static final ApplicabilitySpec
static final ApplicabilitySpec
static final ApplicabilitySpec
static final ApplicabilitySpec
static final ApplicabilitySpec
static final ApplicabilitySpec
static final ApplicabilitySpec
static final ApplicabilitySpec
static final ApplicabilitySpec
static final ApplicabilitySpec
static final ApplicabilitySpec
static final ApplicabilitySpec
static final ApplicabilitySpec
static final ApplicabilitySpec
static final ApplicabilitySpec
static final ApplicabilitySpec
static final ApplicabilitySpec
-
Method Summary
Modifier and TypeMethodDescriptioncalcApplicability
(ApplicabilityFilter filter, boolean followDependencies) static ApplicabilitySpec
create
(Applicability own, ApplicabilityDependency dependency) static ApplicabilitySpec
boolean
implements the contract ofObject.equals(Object)
.Class<? extends ApplicabilityDependency>
getOwn()
int
hashCode()
implements the contract ofObject.hashCode()
.boolean
include
(IncludeInfo info) static ApplicabilitySpec
toString()
-
Field Details
-
SEVERE_TEACHER
-
SEVERE_STUDENT
-
SEVERE_BOTH
-
WARNING_TEACHER
-
WARNING_STUDENT
-
WARNING_BOTH
-
INFO_TEACHER
-
INFO_STUDENT
-
INFO_BOTH
-
FINE_TEACHER
-
FINE_STUDENT
-
FINE_BOTH
-
FINER_TEACHER
-
FINER_STUDENT
-
FINER_BOTH
-
ALL_TEACHER
-
ALL_STUDENT
-
ALL_BOTH
-
-
Method Details
-
getOwn
- Returns:
- own applicability of the spec object
-
getDependencyType
- Returns:
- type of the dependency of the spec object (or null, if dependency is null)
-
getDependencyClone
- Returns:
- clone of the dependency of the spec object (or null, if dependency is null)
-
calcApplicability
- Returns:
- returns the applicability of the union of own applicability and
(if
followDependencies
is true) depended on applicabilities
-
dep
- Parameters:
dep
- dependency- Returns:
- a new spec with minimum own applicability and the given
dep
as dependency
-
own
- Parameters:
lvl
- own levelaud
- own audience- Returns:
- a new spec with no dependency and the given
lvl
andaud
as own applicability.
-
create
- Parameters:
own
- own applicabilitydependency
- dependency will be cloned internally, so the dependency will not be modifiable afterwards.- Returns:
- a new spec with given values
-
toString
-
hashCode
public int hashCode()implements the contract ofObject.hashCode()
. -
equals
implements the contract ofObject.equals(Object)
. -
include
- Specified by:
include
in interfaceIncludeSpec
-