Package org.tweetyproject.commons
Class InterpretationSet<T extends Formula,B extends BeliefBase,S extends Formula>
java.lang.Object
org.tweetyproject.commons.AbstractInterpretation<B,S>
org.tweetyproject.commons.InterpretationSet<T,B,S>
- Type Parameters:
T- The actual class of the formulas stored in this interpretationB- The class of belief bases this interpretation can handleS- The actual class of formulas this interpretation can handle
- All Implemented Interfaces:
Iterable<T>,Collection<T>,Interpretation<B,S>
- Direct Known Subclasses:
AnswerSet,DlInterpretation,HerbrandInterpretation,MlHerbrandInterpretation,NicePossibleWorld,PossibleWorld,QbPossibleWorld
public abstract class InterpretationSet<T extends Formula,B extends BeliefBase,S extends Formula>
extends AbstractInterpretation<B,S>
implements Collection<T>
This class models an interpretation that is a set of some formula and as such
implements the java.util.Collection interface. This class should be used as
ancestor for collection-based interpretations.
- Author:
- Matthias Thimm
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new empty interpretation.InterpretationSet(Collection<? extends T> formulas)Creates a new interpretation with the given collection of formulas. -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanAdds the specified elements to the end of this collection (optional operation).booleanaddAll(Collection<? extends T> c)voidclear()booleanbooleancontainsAll(Collection<?> c)booleaninthashCode()booleanisEmpty()iterator()booleanbooleanremoveAll(Collection<?> c)booleanretainAll(Collection<?> c)intsize()Object[]toArray()<R> R[]toArray(R[] a)toString()Methods inherited from class org.tweetyproject.commons.AbstractInterpretation
satisfiesMethods inherited from interface java.util.Collection
parallelStream, removeIf, spliterator, stream, toArrayMethods inherited from interface org.tweetyproject.commons.Interpretation
satisfies, satisfies
-
Constructor Details
-
InterpretationSet
public InterpretationSet()Creates a new empty interpretation. -
InterpretationSet
Creates a new interpretation with the given collection of formulas.- Parameters:
formulas- a collection of formulas
-
-
Method Details
-
add
- Specified by:
addin interfaceCollection<T extends Formula>
-
addAll
- Specified by:
addAllin interfaceCollection<T extends Formula>
-
add
Adds the specified elements to the end of this collection (optional operation).- Parameters:
elements- to be appended to collection- Returns:
- true if all elements were added, false otherwise
-
clear
public void clear()- Specified by:
clearin interfaceCollection<T extends Formula>
-
contains
- Specified by:
containsin interfaceCollection<T extends Formula>
-
containsAll
- Specified by:
containsAllin interfaceCollection<T extends Formula>
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceCollection<T extends Formula>
-
iterator
-
remove
- Specified by:
removein interfaceCollection<T extends Formula>
-
removeAll
- Specified by:
removeAllin interfaceCollection<T extends Formula>
-
retainAll
- Specified by:
retainAllin interfaceCollection<T extends Formula>
-
size
public int size()- Specified by:
sizein interfaceCollection<T extends Formula>
-
toArray
- Specified by:
toArrayin interfaceCollection<T extends Formula>
-
toArray
public <R> R[] toArray(R[] a)- Specified by:
toArrayin interfaceCollection<T extends Formula>
-
hashCode
public int hashCode() -
equals
-
toString
-