public class FormulaSetOnList extends java.util.LinkedList<Formula> implements _FormulaSet
Constructor and Description |
---|
FormulaSetOnList()
Builds an empty set of signed formulas.
|
Modifier and Type | Method and Description |
---|---|
void |
addAll(_FormulaSet other)
Add all the formulas in the specified set to this formula set.
|
int |
cardinality()
The number of elements in this set.
|
FormulaSetOnList |
clone()
Returns a fresh copy of this set.
|
boolean |
contains(Formula swff)
Returns
true if and only if this set contains the specified
formula. |
java.util.Collection<Formula> |
getAllFormulas()
Returns a collection containing all the formulas in this set or
null if this set is empty. |
Formula |
getFirst()
Returns the first formula in this set or
null if this set is
empty. |
boolean |
remove(Formula wff)
Returns the specified formula from this set.
|
Formula[] |
toArray()
Returns an array of formulas containing all of the formulas in this set.
|
java.lang.String |
toString() |
add, add, addAll, addAll, addFirst, addLast, clear, contains, descendingIterator, element, get, getLast, indexOf, lastIndexOf, listIterator, offer, offerFirst, offerLast, peek, peekFirst, peekLast, poll, pollFirst, pollLast, pop, push, remove, remove, remove, removeFirst, removeFirstOccurrence, removeLast, removeLastOccurrence, set, size, spliterator, toArray
containsAll, isEmpty, removeAll, retainAll
add, isEmpty, iterator
public FormulaSetOnList()
public java.util.Collection<Formula> getAllFormulas()
_FormulaSet
null
if this set is empty.getAllFormulas
in interface _FormulaSet
null
if
this set is empty.public void addAll(_FormulaSet other)
_FormulaSet
addAll
in interface _FormulaSet
other
- the set of formulas to add to this set.public boolean remove(Formula wff)
_FormulaSet
remove
in interface _FormulaSet
wff
- the formula to remove.true
if this set contained the specified formula.public Formula getFirst()
_FormulaSet
null
if this set is
empty.getFirst
in interface java.util.Deque<Formula>
getFirst
in interface _FormulaSet
getFirst
in class java.util.LinkedList<Formula>
null
if this
set is empty.public int cardinality()
_FormulaSet
cardinality
in interface _FormulaSet
public boolean contains(Formula swff)
_FormulaSet
true
if and only if this set contains the specified
formula.contains
in interface _FormulaSet
swff
- the formula to search.true
if and only if this set contains the specified
formula.public FormulaSetOnList clone()
_FormulaSet
clone
in interface _FormulaSet
clone
in class java.util.LinkedList<Formula>
public Formula[] toArray()
_FormulaSet
toArray
in interface java.util.Collection<Formula>
toArray
in interface java.util.List<Formula>
toArray
in interface _FormulaSet
toArray
in class java.util.LinkedList<Formula>
public java.lang.String toString()
toString
in class java.util.AbstractCollection<Formula>