T
- is the type of the language that the ASPIC theory's rules range overpublic abstract class InferenceRule<T extends Invertable> extends java.lang.Object implements Rule<T,T>
Modifier and Type | Field and Description |
---|---|
private T |
conclusion
The rule's conclusion
|
private java.lang.String |
name
Identifying name.
|
private java.util.Collection<T> |
premises
The rule's premises
|
Constructor and Description |
---|
InferenceRule()
Creates an empty instance
|
InferenceRule(T conclusion,
java.util.Collection<T> premise)
Constructs a new inference rule of rule p -> c if strict or p => c else
|
Modifier and Type | Method and Description |
---|---|
void |
addPremise(T premise) |
void |
addPremises(java.util.Collection<? extends T> premises) |
boolean |
equals(java.lang.Object obj) |
T |
getConclusion()
Returns the conclusion of this rule.
|
java.lang.String |
getIdentifier()
Returns the name if it has one, else it returns the hashcode
|
java.lang.String |
getName()
Returns the name
|
java.util.Collection<? extends T> |
getPremise()
Returns the premise of this rule.
|
Signature |
getSignature()
Returns the signature of the language of this formula.
|
int |
hashCode() |
boolean |
isConstraint() |
abstract boolean |
isDefeasible() |
boolean |
isFact() |
void |
setConclusion(T conclusion) |
void |
setName(java.lang.String name)
Sets the name
|
DefeasibleInferenceRule<T> |
toDefeasible() |
StrictInferenceRule<T> |
toStrict() |
java.lang.String |
toString() |
private T extends Invertable conclusion
private java.util.Collection<T extends Invertable> premises
private java.lang.String name
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public abstract boolean isDefeasible()
public java.lang.String toString()
toString
in class java.lang.Object
public StrictInferenceRule<T> toStrict()
public DefeasibleInferenceRule<T> toDefeasible()
public java.lang.String getIdentifier()
public java.lang.String getName()
public void setName(java.lang.String name)
name
- new namepublic boolean isFact()
isFact
in interface Rule<T extends Invertable,T extends Invertable>
public boolean isConstraint()
isConstraint
in interface Rule<T extends Invertable,T extends Invertable>
public void setConclusion(T conclusion)
setConclusion
in interface Rule<T extends Invertable,T extends Invertable>
public void addPremise(T premise)
addPremise
in interface Rule<T extends Invertable,T extends Invertable>
public void addPremises(java.util.Collection<? extends T> premises)
addPremises
in interface Rule<T extends Invertable,T extends Invertable>
public Signature getSignature()
Formula
getSignature
in interface Formula
getSignature
in interface Rule<T extends Invertable,T extends Invertable>
public java.util.Collection<? extends T> getPremise()
Rule
getPremise
in interface Rule<T extends Invertable,T extends Invertable>
public T getConclusion()
Rule
getConclusion
in interface Rule<T extends Invertable,T extends Invertable>