public class SequentOnArray extends java.lang.Object implements _Sequent, java.lang.Cloneable
_Sequent
interface using an array of integers
to represents the sequent. TODO: docConstructor and Description |
---|
SequentOnArray(FormulaFactory factory) |
Modifier and Type | Method and Description |
---|---|
void |
addLeft(java.util.Collection<Formula> formulas) |
void |
addLeft(Formula wff)
Add the specified formula to the left hand side of this sequent.
|
void |
addRight(java.util.Collection<Formula> formulas) |
void |
addRight(Formula wff)
This method add the specified formula in the right hand side of this
sequent.
|
void |
clearLeft() |
void |
clearRight() |
SequentOnArray |
clone()
Returns a fresh copy of this sequent.
|
boolean |
containsLeft(Formula wff)
Returns
true if this sequent contains the specified formula in
the left hand side and false otherwise. |
boolean |
containsLeft(FormulaType type)
Returns
true if this sequent contains at least a formula of
the specified type in the left-hand side. |
boolean |
containsRight(Formula wff)
Returns
true if this sequent contains the specified formula in
the right hand side and false otherwise. |
boolean |
containsRight(FormulaType type)
Returns
true if this sequent contains at least a formula of
the specified type in the right-hand side. |
java.lang.String |
format()
Returns a string describing this goal
|
FormulaFactory |
getFormulaFactory() |
Formula |
getLeft(FormulaType formulaType)
Returns a formula of the specified type contained in the left hand side of
the sequent or
null if no formula of the specified type occurs
in this sequent. |
java.util.Collection<Formula> |
getLeftFormulas()
Returns the set containg all the formulas in the left hand side of this
sequent or
null if the left hand side of this sequent is
empty. |
java.util.Collection<Formula> |
getLeftFormulas(FormulaType formulaType)
Returns the collection of all the formulas in the left hand side of this
sequent with the specified type or
null if the left hand side
of this sequent does not contain any formula of the specified type. |
Formula |
getRight(FormulaType formulaType)
Returns the formula in the right hand side of this sequent or
null if the formula in the right hand side does not have the
specified type. |
java.util.Collection<Formula> |
getRightFormulas()
Returns the set containg all the formulas in the right hand side of this
sequent or
null if the right hand side of this sequent is
empty. |
java.util.Collection<Formula> |
getRightFormulas(FormulaType formulaType)
Returns the collection of all the formulas in the right hand side of this
sequent with the specified type or
null if the right hand side
of this sequent does not contain any formula of the specified type. |
boolean |
isEmpty()
Returns
true iff this sequent is empty. |
boolean |
isIdentityAxiom()
Returns
true iff this is an identity axiom, that is a sequent
of the kind S,H ==> H . |
boolean |
isLeftSideEmpty()
Returns
true iff the left-hand side of this sequent is empty. |
boolean |
isRightSideEmpty()
Returns
true iff the right-hand side of this sequent is empty. |
java.util.Iterator<Formula> |
leftSideIterator() |
boolean |
removeLeft(Formula wff)
Removes the specified formula from the left hand side of this sequent, if
it is present.
|
boolean |
removeRight(Formula wff)
Removes the right formula form this sequent.
|
java.util.Iterator<Formula> |
rigtSideIterator() |
void |
stablePart() |
java.lang.String |
toString() |
public SequentOnArray(FormulaFactory factory)
public java.util.Collection<Formula> getLeftFormulas()
_Sequent
null
if the left hand side of this sequent is
empty.getLeftFormulas
in interface _Sequent
null
.public java.util.Collection<Formula> getLeftFormulas(FormulaType formulaType)
_Sequent
null
if the left hand side
of this sequent does not contain any formula of the specified type.getLeftFormulas
in interface _Sequent
formulaType
- the type of the formulas.null
if the left hand side of the sequent does not contain any
formula of the specified type.public java.util.Collection<Formula> getRightFormulas()
_Sequent
null
if the right hand side of this sequent is
empty.getRightFormulas
in interface _Sequent
null
.public java.util.Collection<Formula> getRightFormulas(FormulaType formulaType)
_Sequent
null
if the right hand side
of this sequent does not contain any formula of the specified type.getRightFormulas
in interface _Sequent
formulaType
- the type of the formulas.null
if the left hand side of the sequent does not contain any
formula of the specified type.public void addLeft(Formula wff)
_Sequent
public void addRight(Formula wff)
_Sequent
public Formula getLeft(FormulaType formulaType)
_Sequent
null
if no formula of the specified type occurs
in this sequent.public Formula getRight(FormulaType formulaType)
_Sequent
null
if the formula in the right hand side does not have the
specified type.public boolean removeLeft(Formula wff)
_Sequent
removeLeft
in interface _Sequent
wff
- the formula to remove.true
if this sequent contained the specified element.public boolean removeRight(Formula wff)
_Sequent
removeRight
in interface _Sequent
wff
- the formula to remove.true
if this sequent contained a formula in the
right-hand side.public boolean isIdentityAxiom()
_Sequent
true
iff this is an identity axiom, that is a sequent
of the kind S,H ==> H
.isIdentityAxiom
in interface _Sequent
true
iff this is an identity axiom.public boolean containsLeft(Formula wff)
_Sequent
true
if this sequent contains the specified formula in
the left hand side and false
otherwise.containsLeft
in interface _Sequent
wff
- the formula to searchtrue
if the left hand side of this sequent contains
the specifiedpublic boolean containsLeft(FormulaType type)
_Sequent
true
if this sequent contains at least a formula of
the specified type in the left-hand side.containsLeft
in interface _Sequent
type
- the type of the formula.true
if this sequent contains at least a formula of
the specified type in the left-hand side.public boolean containsRight(Formula wff)
_Sequent
true
if this sequent contains the specified formula in
the right hand side and false
otherwise.containsRight
in interface _Sequent
wff
- the formula to searchtrue
if the right hand side of this sequent contains
the specifiedpublic boolean containsRight(FormulaType type)
_Sequent
true
if this sequent contains at least a formula of
the specified type in the right-hand side.containsRight
in interface _Sequent
type
- the type of the formula.true
if this sequent contains at least a formula of
the specified type in the right-hand side.public boolean isLeftSideEmpty()
_Sequent
true
iff the left-hand side of this sequent is empty.isLeftSideEmpty
in interface _Sequent
true
iff the right-hand side of this sequent is emptypublic boolean isRightSideEmpty()
_Sequent
true
iff the right-hand side of this sequent is empty.isRightSideEmpty
in interface _Sequent
true
iff the right-hand side of this sequent is emptypublic boolean isEmpty()
_Sequent
true
iff this sequent is empty.public SequentOnArray clone()
_Sequent
clone
in interface _AbstractGoal
clone
in interface _Sequent
clone
in class java.lang.Object
public java.lang.String format()
_AbstractGoal
format
in interface _AbstractGoal
public java.lang.String toString()
toString
in class java.lang.Object
public void stablePart()
stablePart
in interface _Sequent
public void clearRight()
clearRight
in interface _Sequent
public void addLeft(java.util.Collection<Formula> formulas)
public void addRight(java.util.Collection<Formula> formulas)
public FormulaFactory getFormulaFactory()
public java.util.Iterator<Formula> leftSideIterator()
leftSideIterator
in interface _Sequent
public java.util.Iterator<Formula> rigtSideIterator()
rigtSideIterator
in interface _Sequent