Package net.sf.tweety.logics.cl.syntax
Class Conditional
- java.lang.Object
-
- net.sf.tweety.logics.cl.syntax.Conditional
-
- All Implemented Interfaces:
net.sf.tweety.commons.Formula,net.sf.tweety.commons.util.rules.Rule<net.sf.tweety.logics.pl.syntax.PlFormula,net.sf.tweety.logics.pl.syntax.PlFormula>,net.sf.tweety.logics.commons.syntax.interfaces.SimpleLogicalFormula
public class Conditional extends Object implements net.sf.tweety.logics.commons.syntax.interfaces.SimpleLogicalFormula, net.sf.tweety.commons.util.rules.Rule<net.sf.tweety.logics.pl.syntax.PlFormula,net.sf.tweety.logics.pl.syntax.PlFormula>
This class represents a basic conditional (B|A) with formulas A,B.- Author:
- Matthias Thimm, Tim Janus
-
-
Constructor Summary
Constructors Constructor Description Conditional(net.sf.tweety.logics.pl.syntax.PlFormula conclusion)Creates a new conditional with a tautological premise and given conclusion.Conditional(net.sf.tweety.logics.pl.syntax.PlFormula premise, net.sf.tweety.logics.pl.syntax.PlFormula conclusion)Creates a new conditional with the given premise and conclusion.
-
Method Summary
Modifier and Type Method Description voidaddPremise(net.sf.tweety.logics.pl.syntax.PlFormula premise)voidaddPremises(Collection<? extends net.sf.tweety.logics.pl.syntax.PlFormula> premises)Conditionalclone()net.sf.tweety.logics.pl.syntax.ConjunctioncombineWithAnd(net.sf.tweety.logics.commons.syntax.interfaces.Conjunctable f)net.sf.tweety.logics.fol.syntax.DisjunctioncombineWithOr(net.sf.tweety.logics.commons.syntax.interfaces.Disjunctable f)Conditionalcomplement()booleanequals(Object obj)Set<net.sf.tweety.logics.pl.syntax.Proposition>getAtoms()net.sf.tweety.logics.pl.syntax.PlFormulagetConclusion()Class<? extends net.sf.tweety.logics.commons.syntax.Predicate>getPredicateCls()Set<? extends net.sf.tweety.logics.commons.syntax.Predicate>getPredicates()Collection<net.sf.tweety.logics.pl.syntax.PlFormula>getPremise()net.sf.tweety.commons.SignaturegetSignature()inthashCode()booleanisConstraint()booleanisFact()Checks whether this conditional is a fact, i.e.booleanisLiteral()voidsetConclusion(net.sf.tweety.logics.pl.syntax.PlFormula conclusion)StringtoString()
-
-
-
Constructor Detail
-
Conditional
public Conditional(net.sf.tweety.logics.pl.syntax.PlFormula conclusion)
Creates a new conditional with a tautological premise and given conclusion.- Parameters:
conclusion- the conclusion (a formula) of this conditional.
-
Conditional
public Conditional(net.sf.tweety.logics.pl.syntax.PlFormula premise, net.sf.tweety.logics.pl.syntax.PlFormula conclusion)Creates a new conditional with the given premise and conclusion.- Parameters:
premise- the premise (a formula) of this conditional.conclusion- the conclusion (a formula) of this conditional.
-
-
Method Detail
-
getPremise
public Collection<net.sf.tweety.logics.pl.syntax.PlFormula> getPremise()
- Specified by:
getPremisein interfacenet.sf.tweety.commons.util.rules.Rule<net.sf.tweety.logics.pl.syntax.PlFormula,net.sf.tweety.logics.pl.syntax.PlFormula>
-
getConclusion
public net.sf.tweety.logics.pl.syntax.PlFormula getConclusion()
- Specified by:
getConclusionin interfacenet.sf.tweety.commons.util.rules.Rule<net.sf.tweety.logics.pl.syntax.PlFormula,net.sf.tweety.logics.pl.syntax.PlFormula>
-
isFact
public boolean isFact()
Checks whether this conditional is a fact, i.e. has a tautological premise.- Specified by:
isFactin interfacenet.sf.tweety.commons.util.rules.Rule<net.sf.tweety.logics.pl.syntax.PlFormula,net.sf.tweety.logics.pl.syntax.PlFormula>- Returns:
- "true" iff this conditional is a fact.
-
getSignature
public net.sf.tweety.commons.Signature getSignature()
- Specified by:
getSignaturein interfacenet.sf.tweety.commons.Formula- Specified by:
getSignaturein interfacenet.sf.tweety.commons.util.rules.Rule<net.sf.tweety.logics.pl.syntax.PlFormula,net.sf.tweety.logics.pl.syntax.PlFormula>
-
combineWithAnd
public net.sf.tweety.logics.pl.syntax.Conjunction combineWithAnd(net.sf.tweety.logics.commons.syntax.interfaces.Conjunctable f)
-
combineWithOr
public net.sf.tweety.logics.fol.syntax.Disjunction combineWithOr(net.sf.tweety.logics.commons.syntax.interfaces.Disjunctable f)
-
complement
public Conditional complement()
-
hashCode
public int hashCode()
-
equals
public boolean equals(Object obj)
-
getAtoms
public Set<net.sf.tweety.logics.pl.syntax.Proposition> getAtoms()
- Specified by:
getAtomsin interfacenet.sf.tweety.logics.commons.syntax.interfaces.SimpleLogicalFormula
-
getPredicates
public Set<? extends net.sf.tweety.logics.commons.syntax.Predicate> getPredicates()
- Specified by:
getPredicatesin interfacenet.sf.tweety.logics.commons.syntax.interfaces.SimpleLogicalFormula
-
clone
public Conditional clone()
-
isLiteral
public boolean isLiteral()
- Specified by:
isLiteralin interfacenet.sf.tweety.logics.commons.syntax.interfaces.SimpleLogicalFormula
-
getPredicateCls
public Class<? extends net.sf.tweety.logics.commons.syntax.Predicate> getPredicateCls()
- Specified by:
getPredicateClsin interfacenet.sf.tweety.logics.commons.syntax.interfaces.SimpleLogicalFormula
-
isConstraint
public boolean isConstraint()
- Specified by:
isConstraintin interfacenet.sf.tweety.commons.util.rules.Rule<net.sf.tweety.logics.pl.syntax.PlFormula,net.sf.tweety.logics.pl.syntax.PlFormula>
-
setConclusion
public void setConclusion(net.sf.tweety.logics.pl.syntax.PlFormula conclusion)
- Specified by:
setConclusionin interfacenet.sf.tweety.commons.util.rules.Rule<net.sf.tweety.logics.pl.syntax.PlFormula,net.sf.tweety.logics.pl.syntax.PlFormula>
-
addPremise
public void addPremise(net.sf.tweety.logics.pl.syntax.PlFormula premise)
- Specified by:
addPremisein interfacenet.sf.tweety.commons.util.rules.Rule<net.sf.tweety.logics.pl.syntax.PlFormula,net.sf.tweety.logics.pl.syntax.PlFormula>
-
addPremises
public void addPremises(Collection<? extends net.sf.tweety.logics.pl.syntax.PlFormula> premises)
- Specified by:
addPremisesin interfacenet.sf.tweety.commons.util.rules.Rule<net.sf.tweety.logics.pl.syntax.PlFormula,net.sf.tweety.logics.pl.syntax.PlFormula>
-
-